DB v1.6.2 and mysqli, trouble finding the usage for property num_rows
| From: | Erik Franzén | Date: | Fri, 09 Apr 2004 21:05:58 +0000 |
| Subject: | DB v1.6.2 and mysqli, trouble finding the usage for property num_rows | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-27331@lists.php.net to get a copy of this message | ||
I am looking into the DB package for mysqli for PHP5 and I have a question about the folling lines of code in the end of the simpleQuery method:
$result = @mysqli_query($this->connection, $query);
if (!$result) {
return $this->mysqlRaiseError();
}
# this next block is still sketchy..
if (is_object($result)) {
$numrows = $this->numrows($result)
if (is_object($numrows)) {
return $numrows;
}
# need to come up with different means for next line
# since $result is object (int)$result won't fly...
$this->num_rows[(int)$result] = $numrows;
return $result;
}
mysqli_query may return a result object which is taken care of, but what is the num_rows property used for??
I searched for num_rows and I only found it in the freeResult() method.