| 5 database.mysqli.inc | db_num_rows($result) |
| 5 database.pgsql.inc | db_num_rows($result) |
| 5 database.mysql.inc | 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
File
- includes/
database.pgsql.inc, line 188 - Database interface code for PostgreSQL database servers.
Code
<?php
function db_num_rows($result) {
if ($result) {
return pg_num_rows($result);
}
}
?> Login or register to post comments
Comments
Display counts of fields and totals of field values
I'm fairly new to Drupal and haven't a clue how to have a view display counts of various fields in a view.
Using Drupal 2.60, mysql.
I have to print out separate views to show total participants, total number of records, totals for payments and list methods of payment with totals for each payment method.
Are there any step by step information or tutorials please to show how to use code like the above.
Thanks
Roger
Display counts of fields and totals of field values
I'm fairly new to Drupal and haven't a clue how to have a view display counts of various fields in a view.
Using Drupal 2.60, mysql.
I have to print out separate views to show total participants, total number of records, totals for payments and list methods of payment with totals for each payment method.
Are there any step by step information or tutorials please to show how to use code like the above.
Thanks
Roger