acctman Posted May 20, 2008 Share Posted May 20, 2008 i'm receiving this error Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in Line 59 $result = mysql_query($sql,$db); if(mysql_num_rows($result)==1) // This is Line 59 Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 20, 2008 Share Posted May 20, 2008 Your query is failing. Use this for more debug info: $result = mysql_query($sql,$db) or die("Query error: ".mysql_error()); if(mysql_num_rows($result)==1) // This is Line 59 Edit: If you still can't figure it out, provide the query. Quote Link to comment Share on other sites More sharing options...
obsidian Posted May 20, 2008 Share Posted May 20, 2008 It most likely means you have an error in your SQL syntax or something else wrong with the query. Do this to trouble shoot: <?php $res = mysql_query($sql, $db) or die(mysql_error()); if (mysql_num_rows($res) == 1) { } ?> Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 20, 2008 Share Posted May 20, 2008 It most likely means you have an error in your SQL syntax or something else wrong with the query. Do this to trouble shoot: <?php $res = mysql_query($sql, $db) or die(mysql_error()); if (mysql_num_rows($res) == 1) { } ?> ...51 seconds too late ;-) Quote Link to comment Share on other sites More sharing options...
acctman Posted May 21, 2008 Author Share Posted May 21, 2008 i changed mysql_query to sql_query and everything worked Quote Link to comment Share on other sites More sharing options...
rhodesa Posted May 21, 2008 Share Posted May 21, 2008 well...sql_query is not a PHP function....so you must have some custom functions defined 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.