Entry
DB Error unknown error when inserting row into MySQL; Echoed SQL worked in console
Mar 15th, 2004 10:42
Matt Chatterley, Scott Kraatz,
You can obtain more information on errors such as this by using a
construct akin to:
$sSQL = "SQL Statement";
mysql_query($sSQL, $database_connection) or
die("Failed to execute: ".$sSQL."<br>".mysql_error($database_connection));
It may be that you've failed to enclose a string argument in ''s, or
something similar - by using the above you'll get a good amount of debug
output (i.e. the final statement sent to the database), plus the error
returned.