Guest ShaneLarson Posted September 30, 2006 Share Posted September 30, 2006 What do you edit to [code]or die ("");[/code] to display what the error is caused off of. Quote Link to comment Share on other sites More sharing options...
Gaoshan Posted September 30, 2006 Share Posted September 30, 2006 [code]<?php$result = mysql_query('SELECT * WHERE 1=1');if (!$result) { die('Invalid query: ' . mysql_error());}?>[/code] Quote Link to comment Share on other sites More sharing options...
Guest ShaneLarson Posted September 30, 2006 Share Posted September 30, 2006 Thanks Quote Link to comment Share on other sites More sharing options...
alpine Posted September 30, 2006 Share Posted September 30, 2006 No need to run an IF test, the one-line version$sql = mysql_query("select * from table") or die(mysql_error()); Quote Link to comment 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.