1.20.x database.inc db_find_prefixed_tables($table_expression)

Finds all tables that are like the specified base table name. This is a backport of the change made to db_find_tables in Drupal 8 to work with virtual, un-prefixed table names. The original function is retained for Backwards Compatibility.

Parameters

$table_expression: An SQL expression, for example "simpletest%" (without the quotes).

Return value

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

See also

https://www.drupal.org/node/2552435

Related topics

File

includes/database/database.inc, line 3051
Core systems for the database layer.

Code

function db_find_prefixed_tables($table_expression) {
  return Database::getConnection()->schema()->findPrefixedTables($table_expression);
}