function DatabaseTemporaryQueryTestCase::countTableRows

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 3338

Class

DatabaseTemporaryQueryTestCase
Temporary query tests.

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.