publicitystunt
02-02-2006, 09:42 PM
why do these:
// Check if the username exists
$usernameinuse = mysql_query("SELECT * FROM userdata WHERE userid = '$username'");
$isusernameinuse = mysql_num_rows($usernameinuse);
// Find out how many users there are so that you can determine the next user number
$usercount = mysql_query("SELECT * FROM userdata");
$noofusers = mysql_num_rows($usercount);
produce these (error messages returned to me in the browser)(respectively):
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/studygui/public_html/php/createnewuser.php on line 361
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/studygui/public_html/php/createnewuser.php on line 385
any help would be greatly appreciated, if there is not enough information here to solve the problem i have the entire script, but i think that this is the problem thanks again
// Check if the username exists
$usernameinuse = mysql_query("SELECT * FROM userdata WHERE userid = '$username'");
$isusernameinuse = mysql_num_rows($usernameinuse);
// Find out how many users there are so that you can determine the next user number
$usercount = mysql_query("SELECT * FROM userdata");
$noofusers = mysql_num_rows($usercount);
produce these (error messages returned to me in the browser)(respectively):
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/studygui/public_html/php/createnewuser.php on line 361
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/studygui/public_html/php/createnewuser.php on line 385
any help would be greatly appreciated, if there is not enough information here to solve the problem i have the entire script, but i think that this is the problem thanks again