Help! Error inserting record
Posted: Wed Nov 12, 2008 11:06 am
This is my first post to any forum, and I am relatively new to PHP & MYSQL. That said, here's the problem; I am trying to make an online photogallery and on the album create page I keep recieving the error Error inserting record: Column count doesn't match value count at row 1
I have searched online for an answer, and a missing comma seems to be the most likely conclusion
Here is the section of code where I believe the problem is:
Any help/ideas would be greatly appreciated
Thanks!
FD
I have searched online for an answer, and a missing comma seems to be the most likely conclusion
Here is the section of code where I believe the problem is:
Code: Select all
db_connect();
$sql = "INSERT INTO albums VALUES( '" . addslashes($_POST['album_name']) . "', '" . addslashes($_POST['album_desc']) . "', 0, '', '')";
$result = @mysql_query($sql) or die("Error inserting record: " . mysql_error());
if ($result){Any help/ideas would be greatly appreciated
Thanks!
FD