db_num_rows

Definition

db_num_rows($result)
includes/database.pgsql.inc, line 105

Description

Determine how many result rows were found by the preceding query.

Parameters

$result A database query result resource, as returned from db_query().

Return value

The number of result rows.

Related topics

Namesort iconDescription
Database abstraction layerAllow the use of different database servers using the same code base.

Code

<?php
function db_num_rows($result) {
  if ($result) {
    return pg_num_rows($result);
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.