Un3qual
Un3qual

Reputation: 1342

SQL Num Rows Param/Boolean Error

I have been following these tutorials: http://www.youtube.com/watch?v=FUI2JDaNpk0 but for some reason when I enter the correct password I get this error:

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /Applications/XAMPP/xamppfiles/htdocs/login.php on line 12

Upvotes: 1

Views: 76

Answers (1)

O. Jones
O. Jones

Reputation: 108641

it seems like your mysql_query operation failed. When queries fail they return false, and when they succeed they return a record set. It makes no sense to say mysql_num_rows(false); and that's why you're getting this error.

Upvotes: 1

Related Questions