Same name in this branch
- 4.7.x includes/database.pgsql.inc \db_num_rows()
- 4.7.x includes/database.mysqli.inc \db_num_rows()
- 4.7.x includes/database.mysql.inc \db_num_rows()
Same name and namespace in other branches
- 4.6.x includes/database.pgsql.inc \db_num_rows()
- 4.6.x includes/database.mysql.inc \db_num_rows()
- 5.x includes/database.pgsql.inc \db_num_rows()
- 5.x includes/database.mysqli.inc \db_num_rows()
- 5.x includes/database.mysql.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
1 call to db_num_rows()
- 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.
File
- includes/
database.pgsql.inc, line 156 - Database interface code for PostgreSQL database servers.
Code
function db_num_rows($result) {
if ($result) {
return pg_num_rows($result);
}
}