mysql_num_rows() expects parameter 1 to be resource error message on register form
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2973202/mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given-in-select">mysql_fetch_array() expects parameter 1 to be resource, boolean given in select</a>  </p>
</blockquote>



<p>I am working on a registration form which corresponds with two mysql tables in my database.</p>

<ol>
<li>userlogin - contains all the details registered with the site</li>
<li>userlogin_fb - contains all the details of users using the fb connect facility</li>
</ol>

<p>Now when a user signs up there cannot be a clash of username or email address. I am now implementing the validation code for checking the email addresses across the two tables (which will be used as a reference for the username validation):</p>

<p>But i keep receiving the following error message:</p>

<blockquote>
  <p>Warning: mysql_num_rows() expects
  parameter 1 to be resource, boolean
  given in register.php on line 144</p>
</blockquote>

<p>How do i go about resolving this?</p>

<pre><code>//select all rows from our users table where the emails match
$res1 = mysql_query("SELECT * FROM `userloginl.email`,`userlogin_fb.email` WHERE `email` = '".$email."'");
$num1 = mysql_num_rows($res1);

//if the number of matchs is 1
if($num1 == 1){
    //the email address supplied is taken so display error message
    echo "&lt;center&gt;The &lt;b&gt;e-mail&lt;/b&gt; address you supplied is already taken&lt;/center&gt;";
    include_once ("resources/php/footer.php");      
    exit;   
}else{
    //finally, otherwise register there account }
</code></pre>

<p>Any help would be appreciated - thanks!</p>
