When executing the code below, I am getting the error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given. From my understanding this would imply that mysql_query is returning false meaning the query is failing but I am not sure why.. Any ideas?

include 'global.php';


$query=" SELECT * FROM cases WHERE case='$case'";

while ($i < $num) {
Member Avatar

case is a keyword in mysql. place all table and field names within backticks, like:

SELECT * FROM `cases` WHERE `case` = '$case'

The backtick button is usually before the number 1 on your keyboard (depends on the type). My keyboard needs the ALT + backtick button, release ALT, then any other key to display it.

Thanks, the error is gone.