function DatabaseSchema_sqlite::findTables

Overrides DatabaseSchema::findTables

File

includes/database/sqlite/schema.inc, line 674

Class

DatabaseSchema_sqlite

Code

public function findTables($table_expression) {
    // Don't add the prefix, $table_expression already includes the prefix.
    $info = $this->getPrefixInfo($table_expression, FALSE);
    // Can't use query placeholders for the schema because the query would have
    // to be :prefixsqlite_master, which does not work.
    $result = db_query("SELECT name FROM " . $info['schema'] . ".sqlite_master WHERE type = :type AND name LIKE :table_name", array(
        ':type' => 'table',
        ':table_name' => $info['table'],
    ));
    return $result->fetchAllKeyed(0, 0);
}

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