$query="UPDATE `all` SET FilterToggle='0' WHERE id=" . $_SESSION['id'];
When I run mysql_query() it returns false when I call the mysql_num_rows function. However I check it before the _num_rows function:
if ($_POST['filter'] == true)
{
$query="UPDATE `all` SET FilterToggle='0' WHERE id=" . $_SESSION['id'];
$res=mysql_query($query) or die(mysql_error());
if ($res) {
echo mysql_num_rows($res);
}
else
{
echo 'bad query';
}
}
So I figured it's either a problem with my logic of the code or the query. It says mysql_num_rows() expects the first argument/parameter to be a resource and not a boolean.

New Topic/Question
Reply



MultiQuote





|