Warning: mysql_fetch_assoc() expects parameter 1 to be resource
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2973202/php-error-mysql-fetch-array-expects-parameter-1-to-be-resource-boolean-given">PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given</a>  </p>
</blockquote>



<p>I am trying to execute the php code in my localhost its running. When I transfered the same code to my host getting mysql_fetch_assoc() expects parameter 1 to be resource. Below is my code I don't know what am I really missing</p>

<pre><code>   $checkQuery = "select MGUserName from MovinGalaxyLogin where MGUserName='checksan'or MGEmailID='checksan'";
   echo $checkQuery;
   $sessionUserName = mysql_query($checkQuery);

    while ($row = mysql_fetch_assoc($sessionUserName)) {
    $sessionUserName= $row["MGUserName"];
    }
</code></pre>

<p>Kindly Help me with this.</p>

<p>Thanks in Advance,
Santhosh KUmar</p>
