You are here

function db_num_rows in Drupal 4

Same name in this branch
  1. 4 includes/database.mysqli.inc \db_num_rows()
  2. 4 includes/database.mysql.inc \db_num_rows()
  3. 4 includes/database.pgsql.inc \db_num_rows()
Same name and namespace in other branches
  1. 5 includes/database.mysqli.inc \db_num_rows()
  2. 5 includes/database.mysql.inc \db_num_rows()
  3. 5 includes/database.pgsql.inc \db_num_rows()

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

30 calls to db_num_rows()
aggregator_parse_feed in modules/aggregator.module
archive_page in modules/archive.module
Menu callback; lists all nodes posted on a given date.
block_admin_configure_validate in modules/block.module
block_box_add_validate in modules/block.module
blog_block in modules/blog.module
Implementation of hook_block().

... See full list

File

includes/database.mysql.inc, line 164
Database interface code for MySQL database servers.

Code

function db_num_rows($result) {
  if ($result) {
    return mysql_num_rows($result);
  }
}