Jump to content

[SOLVED] mysql_num_rows


master82

Recommended Posts

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/blabla/public_html/page.php on line 87

 

$emc = mysql_query("SELECT actid FROM activate WHERE actemail = {$_POST['email']}", $db);
if(mysql_num_rows($emc)>0)
{
die("The email addressed is already in use!");
}

 

Line 87 is:

 

if(mysql_num_rows($emc)>0)

 

Can anyone solve this? lol

Link to comment
https://forums.phpfreaks.com/topic/38229-solved-mysql_num_rows/
Share on other sites

$emc = mysql_query("SELECT actid FROM activate WHERE actemail='{$_POST['email']}'");
$rows=mysql_num_rows($emc);
if ($rows>'0') {
die("The email addressed is already in use!");
}

 

If that doesn't work echo the $rows variable to see what you are getting back. It may be that you aren't actually getting any results from your query.

Link to comment
https://forums.phpfreaks.com/topic/38229-solved-mysql_num_rows/#findComment-183105
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.