Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in selectPHP錯誤:mysqli_num_rows()預計參數1被mysqli_result,布爾給
我得到下面的下面的錯誤。 53行是if(mysqli_num_rows($r) == 1) {
。我該如何解決這個問題。
PHP error: on line 53: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
這裏是PHP MySQL代碼。
$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) {