ERROR: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\...\....php on line 19 [duplicate]
Solution 1:
Probably mysql_query()
failed. In this case it returns false
. Use mysql_error() to find out, what happens.
Solution 2:
When there is an error, mysql_query()
returnse false
instead of a resource object. Check the return value of mysql_query()
before you pass it to mysql_num_rows()
.