Possible Duplicate:
PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given
I am getting the following error:
Warning: mysql_fetch_assoc() expects parameter 1 to be resource
My query seems fine, here is my code:
function products()
{
$query = "SELECT id, quantity, price FROM dvd WHERE quantity > 0";
if (!$query)
{
echo "no product found";
die(mysql_error());
}
else
{
while ($query_row = mysql_fetch_assoc($query)){
echo "Test";
}
}
}
What does that error mean?