Not a valid MySQL result resource
Can anyone tell me why the following:
------------------------------------
function in_use($userid) {
global $user_tablename;
$query = "SELECT userid FROM $user_tablename WHERE userid = '$userid'";
$result = mysql_query($query);
if (mysql_num_rows($result)) return 0;
else return 1;
}
----------------------------------------
Returns the following error:
"Warning: mysql_num_rows(): supplied argument is
not a valid MySQL result resource"
This is from the register.php script in chapter 13
on page 469, middle of page.
-David
|