1 database_test.test DatabaseTemporaryQueryTestCase::countTableRows($table_name)

Return the number of rows of a table.

File

core/modules/simpletest/tests/database_test.test, line 3009
Database tests.

Class

DatabaseTemporaryQueryTestCase
Temporary query tests.

Code

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