function DB_pgsql::numRows in Flickr API 5
Gets the number of rows in a result set
This method is not meant to be called directly. Use DB_result::numRows() instead. It can't be declared "protected" because DB_result is a separate object.
Parameters
resource $result PHP's query result resource:
Return value
int the number of rows. A DB_Error object on failure.
Overrides DB_common::numRows
See also
1 call to DB_pgsql::numRows()
- DB_pgsql::simpleQuery in phpFlickr/
PEAR/ DB/ pgsql.php - Sends a query to the database server
File
- phpFlickr/
PEAR/ DB/ pgsql.php, line 570
Class
- DB_pgsql
- The methods PEAR DB uses to interact with PHP's pgsql extension for interacting with PostgreSQL databases
Code
function numRows($result) {
$rows = @pg_numrows($result);
if ($rows === null) {
return $this
->pgsqlRaiseError();
}
return $rows;
}