Possible duplicate:
mysql_fetch_array () expects parameter 1 to be a resource, boolean is set to select
Following is the following error. Line 53 if(mysqli_num_rows($r) == 1) { . How can I fix this problem.
PHP error: on line 53: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
Here is the PHP MySQL code.
$d = "UPDATE users SET del = 1, del_date = NOW() WHERE userid = '" . $_SESSION['userid'] . "'"; $r = mysqli_query ($mysqli, $d) or trigger_error("Query: $d\n<br />MySQL Error: " . mysqli_error($mysqli)); if(mysqli_num_rows($r) == 1) {
source share