1.20.x database_test.test | DatabaseTemporaryQueryTestCase::countTableRows($table_name) |
Return the number of rows of a table.
File
- modules/
simpletest/ tests/ database_test.test, line 2997 - Database tests.
Class
- DatabaseTemporaryQueryTestCase
- Temporary query tests.
Code
function countTableRows($table_name) {
return db_select($table_name)->countQuery()->execute()->fetchField();
}