function Connection::prepareQuery
Same name in this branch
- 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection::prepareQuery()
- 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::prepareQuery()
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::prepareQuery()
Prepares a query string and returns the prepared statement.
This method caches prepared statements, reusing them when possible. It also prefixes tables names enclosed in curly-braces.
Parameters
$query: The query string as SQL, with curly-braces surrounding the table names.
Return value
\Drupal\Core\Database\StatementInterface A PDO prepared statement ready for its execute() method.
Overrides Connection::prepareQuery
File
-
core/
lib/ Drupal/ Core/ Database/ Driver/ sqlite/ Connection.php, line 401
Class
- Connection
- SQLite implementation of \Drupal\Core\Database\Connection.
Namespace
Drupal\Core\Database\Driver\sqliteCode
public function prepareQuery($query) {
return $this->prepare($this->prefixTables($query));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.