Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]
PHP Snippet 1:
$amn = mysql_query("SELECT * FROM `Messages` WHERE to_user='$usr' AND read='0'");
if($amn === false) {
var_dump(mysql_error());
}
else {
print_r(mysql_num_rows($amn));
}