You are here

function dba_get_row_count in Database Administration 5

Return the number of rows in the specified table.

Related topics

1 call to dba_get_row_count()
theme_dba_database_overview_form in ./dba.module

File

./dba.module, line 1369
Allows administrators direct access to their Drupal database. Written by Jeremy Andrews <jeremy@kerneltrap.org>, June 2004. PostgreSQL functionality provided by AAM <aam@ugpl.de> Major security audit, porting, and maintenance by Derek…

Code

function dba_get_row_count($table) {
  $rows = db_fetch_object(db_query("SELECT COUNT(*) as count FROM {$table}"));
  return $rows->count;
}