note 118311 added to mysqli-result.num-rows
| From: | justsoatinboxdotru | Date: | Sat, 14 Nov 2015 09:36:40 +0000 |
| Subject: | note 118311 added to mysqli-result.num-rows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-204148@lists.php.net to get a copy of this message | ||
in php 5.3.8 had unexpected troubles when checking for mysqli_result::$num_rows
If the result of the query is empty then var_dump of the result will be like this:
class mysqli_result#5 (5) {
public $current_field => NULL
public $field_count => NULL
public $lengths => NULL
public $num_rows => NULL
public $type => NULL
}
but var_dump($result->num_rows) will give integer-typed zero instead of NULL:
int(0)
----
Server IP: 72.52.91.14
Probable Submitter: 95.153.131.127
----
Manual Page -- http://php.net/manual/en/mysqli-result.num-rows.php
Edit -- https://master.php.net/note/edit/118311
Del: integrated -- https://master.php.net/note/delete/118311/integrated
Del: useless -- https://master.php.net/note/delete/118311/useless
Del: bad code -- https://master.php.net/note/delete/118311/bad+code
Del: spam -- https://master.php.net/note/delete/118311/spam
Del: non-english -- https://master.php.net/note/delete/118311/non-english
Del: in docs -- https://master.php.net/note/delete/118311/in+docs
Del: other reasons-- https://master.php.net/note/delete/118311
Reject -- https://master.php.net/note/reject/118311
Search -- https://master.php.net/manage/user-notes.php