1 database.inc public DatabaseConnection::prepare($query)

Provides a pass-through to the PDO prepare method.

In adding support for PHP 8, the Backdrop DatabaseConnection no longer directly extends the PHP PDO object. A side-effect is that calls to PDO methods no longer worked. This provides a pass-through to this method specifically for compatibility with previous versions of Backdrop. See https://github.com/backdrop/backdrop-issues/issues/5094.

@since 1.19.2

Parameters

$query:

Return value

bool|PDOStatement:

File

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

Class

DatabaseConnection
Base Database API class.

Code

public function prepare($query) {
  return $this->pdo->prepare($query);
}