mc_keny Posted February 13, 2008 Share Posted February 13, 2008 hey yall i coded a pop up/alertwhen i try inserting the info i get the message the table 'mckeny_wap.mc_alert' doesn't exist mckeny_wap is the db name i go to the db and look carefully and the table mc_alert does exist no incorrect spelling $sql = mysql_query("INSERT INTO mc_alert (towho,date,text,bywho) VALUES('$towho','$tsent','$alert','$nid')");if($sql){echo "alert sent successfully.. ";}else{echo "db error".mysql_error();} Link to comment Share on other sites More sharing options...
justsomeguy Posted February 13, 2008 Share Posted February 13, 2008 If the table was there, it would find it. Make sure that the MySQL user has access to the table (if not, it would probably be a different error message). But if you're telling it to connect to a certain database server, select a database, and if that table exists there it's not going to give you a message that it doesn't exist. Link to comment Share on other sites More sharing options...
teng84 Posted February 14, 2008 Share Posted February 14, 2008 Sometimes when you insert different data type it gives you that message eg insert string to your date table , not quite sure about this but this happens when you select and you take condition like number=string Link to comment Share on other sites More sharing options...
mc_keny Posted February 14, 2008 Author Share Posted February 14, 2008 no justsomeguy got 17 tables and all worked well....only mc_alert table doesn't want to recieve data i check it and its there cause i manually add some thing from the data base and it inserted i think TENG84 IS correct Link to comment Share on other sites More sharing options...
mc_keny Posted February 14, 2008 Author Share Posted February 14, 2008 i re name the table to mc_popup and it works now... i figure more than less some words can not use such as : to,new,by etc in fields Link to comment Share on other sites More sharing options...
Synook Posted February 14, 2008 Share Posted February 14, 2008 MySQL reserved words: http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.