Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
//define variable to check the number of rows where the sql query is true to find out if the username or password are already in use
$EmailCheck = mysql_query("SELECT `Email` FROM `Customer` WHERE `Email` = '$RegCusEmail'");
$UserCheck = mysql_query("SELECT `Username` FROM `Customer` WHERE `Username` = '$RegCusUser'");
//checks if emails in use
if (mysql_num_rows($EmailCheck) != 0)
{
echo '<p id="error">The Email address you have entered is already in use.<p>';
}
//checks if username is in use
elseif (mysql_num_rows($UserCheck) != 0)
{
echo '<p id="error">The username you have entered is already in use.<p>';
}
The above code is supposed to search a database for the email and username of the person registering and if they already exist tell the user to use a different one but when I use it I get this error?
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (file directory) on line 56 Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in (file directory) on line 62