public function numRows($result) { // see the note for tryQuery(); if (is_bool($result)) { return 0; } return @mysqli_num_rows($result); }