db_num_rows

includes/database.pgsql.inc, line 105

Versions
4.6 – 5
db_num_rows($result)

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

▾ 19 functions call db_num_rows()

aggregator_parse_feed in modules/aggregator.module
book_block in modules/book.module
Implementation of hook_block().
book_menu in modules/book.module
Implementation of hook_menu().
comment_render in modules/comment.module
do_search in modules/search.module
Do a query on the full-text search index for a word or words.
flood_is_allowed in includes/common.inc
Check if the current visitor (hostname/IP) is allowed to proceed with the specified event. The user is allowed to proceed if he did not trigger the specified event more than $threshold times per hour.
forum_block in modules/forum.module
Implementation of hook_block().
locale_admin_manage_add in modules/locale.module
Page handler for the language addition screen
node_admin_nodes in modules/node.module
Generate the content administration overview.
node_page_default in modules/node.module
Generate a listing of promoted nodes.
ping_cron in modules/ping.module
Implementation of hook_cron().
sess_read in includes/session.inc
taxonomy_render_nodes in modules/taxonomy.module
Accepts the result of a pager_query() call, such as that performed by taxonomy_select_nodes(), and formats each node along with a pager.
update_101 in database/updates.inc
user_block in modules/user.module
Implementation of hook_block().
user_edit_validate in modules/user.module
user_fields in modules/user.module
user_get_authmaps in modules/user.module
Accepts an user object, $account, or a DA name and returns an associative array of modules and DA names. Called at external login.
user_load in modules/user.module
Fetch a user object.

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.