You are here

function DatabaseTemporaryQueryTestCase::countTableRows in Drupal 7

Return the number of rows of a table.

1 call to DatabaseTemporaryQueryTestCase::countTableRows()
DatabaseTemporaryQueryTestCase::testTemporaryQuery in modules/simpletest/tests/database_test.test
Confirm that temporary tables work and are limited to one request.

File

modules/simpletest/tests/database_test.test, line 3168

Class

DatabaseTemporaryQueryTestCase
Temporary query tests.

Code

function countTableRows($table_name) {
  return db_select($table_name)
    ->countQuery()
    ->execute()
    ->fetchField();
}