db_find_tables

Versions
7
db_find_tables($table_expression)

Find all tables that are like the specified base table name.

Parameters

$table_expression An SQL expression, for example "simpletest%" (without the quotes). BEWARE: this is not prefixed, the caller should take care of that.

Return value

Array, both the keys and the values are the matching tables.

Related topics

▾ 1 function calls db_find_tables()

simpletest_clean_database in modules/simpletest/simpletest.module
Removed prefixed tables from the database that are left over from crashed tests.

Code

includes/database/database.inc, line 2341

<?php
function db_find_tables($table_expression) {
  return Database::getConnection()->schema()->findTables($table_expression);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.