steviez Posted June 23, 2008 Share Posted June 23, 2008 Hi, I keep getting this error in my script: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/****/public_html/register.php on line 62 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/****/public_html/register.php on line 92 Here is the code in question: <?php // Check That Email Is Not In Use $check = "SELECT email FROM members WHERE email = '".$_POST['email']."'"; $qry = mysql_query($check); if(mysql_num_rows($qry) !== 0) { $error = 1; $error_message = "The email address you have entered is already in use, please use a different email address or login to your existing account."; } // Check That Username Is Not In Use $check = "SELECT username FROM members WHERE username = '".$_POST['username']."'"; $qry1 = mysql_query($check); if(mysql_num_rows($qry1) !== 0) { $error = 1; $error_message = "The username you have chosen is in use by another member, please choose a new username."; } ?> Any ideas? Link to comment https://forums.phpfreaks.com/topic/111532-solved-mysql_num_rows-help/ Share on other sites More sharing options...
steviez Posted June 23, 2008 Author Share Posted June 23, 2008 oOOooOPs i have fixed it the database table was named wrong Link to comment https://forums.phpfreaks.com/topic/111532-solved-mysql_num_rows-help/#findComment-572426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.