shadiadiph Posted April 12, 2009 Share Posted April 12, 2009 MM sorry for a simple question but I have just stopped using my dbclass file and want to do a new site without it. I keep getting the same error?? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource $checkuser = "select userID from usertbl where username='$username'"; $temps = mysql_query($checkuser); $usertotal = mysql_num_rows($temps); to me it looks ok but obviously it isn't as i said i have been using a DB class until now so I am not sure. I want to stop using the class as there appear to be a few errors in the class.php Link to comment https://forums.phpfreaks.com/topic/153736-solved-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/ Share on other sites More sharing options...
MasterACE14 Posted April 12, 2009 Share Posted April 12, 2009 change this line... $temps = mysql_query($checkuser); to... $temps = mysql_query($checkuser) or die(mysql_error()); see what turns up Link to comment https://forums.phpfreaks.com/topic/153736-solved-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/#findComment-807904 Share on other sites More sharing options...
shadiadiph Posted April 12, 2009 Author Share Posted April 12, 2009 ok thanks Link to comment https://forums.phpfreaks.com/topic/153736-solved-warning-mysql_num_rows-supplied-argument-is-not-a-valid-mysql-result/#findComment-807906 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.