Drezard Posted March 25, 2007 Share Posted March 25, 2007 Heres the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\xampp\htdocs\beta\core\user\user.class.php on line 77 Heres the code: 73.$query = "SELECT * FROM user_ids WHERE username='$username'"; 75. $result = mysql_query($query); 77. $count = mysql_num_rows($result); 79. if ($count == 1) { whats wrong? Thanks, Daniel Quote Link to comment https://forums.phpfreaks.com/topic/44197-mysql-error/ Share on other sites More sharing options...
MadTechie Posted March 25, 2007 Share Posted March 25, 2007 as a guess i would say line 73 $query = "SELECT * FROM user_ids WHERE username='$username'"; is this SQL statment valid ? Quote Link to comment https://forums.phpfreaks.com/topic/44197-mysql-error/#findComment-214625 Share on other sites More sharing options...
The Bat Posted March 25, 2007 Share Posted March 25, 2007 Change $result = mysql_query($query); to: $result = mysql_query($query) or die (mysql_error()); and post the output. Quote Link to comment https://forums.phpfreaks.com/topic/44197-mysql-error/#findComment-214631 Share on other sites More sharing options...
tauchai83 Posted March 25, 2007 Share Posted March 25, 2007 this is undoubtedly have to deal with your record in DB. it doen't match with your SQL query and thus no valid result is returned. Please post more detail of your php code. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/44197-mysql-error/#findComment-214773 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.