esgaroth Posted November 5, 2005 Share Posted November 5, 2005 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? Quote Link to comment https://forums.phpfreaks.com/topic/2805-mysql-qeury-errors/ Share on other sites More sharing options...
ryanlwh Posted November 5, 2005 Share Posted November 5, 2005 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(); Quote Link to comment https://forums.phpfreaks.com/topic/2805-mysql-qeury-errors/#findComment-9393 Share on other sites More sharing options...
esgaroth Posted November 5, 2005 Author Share Posted November 5, 2005 thanks, exactly what i was looking for. Quote Link to comment https://forums.phpfreaks.com/topic/2805-mysql-qeury-errors/#findComment-9398 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.