Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I have a problem looping through a sql query , here is my code that reads each result from the query result.
// Check if PCID is already inside DB > ActivePCS
$CHECK_PCID_Q = mysql_query("SELECT * FROM ActivePCS where CustomerID='$CIDX' AND Customer_Email='$EMAIL' AND Pc_Name='$PCID'");
//$CHECK_PCID_R = mysql_fetch_array($CHECK_PCID_Q);
$isfound = 0;
while($CHECK_PCID_R = mysql_fetch_array($CHECK_PCID_Q)) // <<-- error is here
{
if($CHECK_PCID_R['PC_Name'] == $PCID)
{
$isfound = 1;
break;
}
}
But i get that error :
warning mysql_fetch_array() expects parameter 1 to be resource boolean given
In my localhost it works fine , but when i uploaded it to my server it gave that error.
EDIT : Sorry my bad , my query had the wrong table name.....