Jump to content

Archived

This topic is now archived and is closed to further replies.

esgaroth

mysql qeury errors

Recommended Posts

i have a few sql queries that are not working. is there any way to get mysql or php to tell me why the query is failing? my apache log file tells me nothing about mysql and the mysql log file only tells me about server errors. am i missing something obvious?

Share this post


Link to post
Share on other sites

mysql_error() coupled with die() or echo

 $result = mysql_query($sql) or die(myql_error()); 
//some coders like this
$result = mysql_query($sql);
if(!$result) echo mysql_error();

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.