programguru Posted January 30, 2009 Share Posted January 30, 2009 i created a simple script to populate a myslq table with php. all is working perfectly fine, but when the table has 0 records, i cannot ad any records through my php script (although the script processes with no errors?) - which works perfectly fine when there is at least 1 record in the table. anyone know why this would happen and how to fix it? my googles searches and php.net searches yielded nothing thus far. here is my mysql: $sql = "INSERT INTO $table_name (id, date, title, description, image) VALUES ('', '$_POST[date]', '$_POST[title]', '$_POST[description]', '$_POST[image]')"; ?> sos! Link to comment https://forums.phpfreaks.com/topic/143197-unless-a-current-record-is-in-my-table-none-can-be-added/ Share on other sites More sharing options...
programguru Posted January 31, 2009 Author Share Posted January 31, 2009 fixed it! Link to comment https://forums.phpfreaks.com/topic/143197-unless-a-current-record-is-in-my-table-none-can-be-added/#findComment-751144 Share on other sites More sharing options...
kenrbnsn Posted January 31, 2009 Share Posted January 31, 2009 What was the problem/fix? Ken Link to comment https://forums.phpfreaks.com/topic/143197-unless-a-current-record-is-in-my-table-none-can-be-added/#findComment-751198 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.