src/Database/Drivers/LegacyDriver.php
/**
	 * Executes a prepared statement on the database server and returns the results.
	 *
	 * @param string $statement
	 * @param array $bindings
	 * @return int|object|bool
	 *
	 * @throws DatabaseException on error
	 */
Executes a prepared statement on the database server and returns the results.
@param string $statement
@param array $bindings
@return int|object|bool

@throws DatabaseException on error
Executes a prepared statement on the database server and returns the results . @param string $statement @param array $bindings @return int|object|bool @throws DatabaseException on error
protected function prepared($statement, array &$bindings = array()) {
		$marks = array();
		$replacements = array();
		foreach ($bindings as $value) {
			$marks[] = '?';
			$replacements[] = $this->prepareValue($value);
		}
		$statement = str_replace($marks, $replacements, $statement);
		try {
			return $this->query($statement);
		}
		catch (DatabaseException $e) {
			$message = $e->getMessage();
			$message = str_replace('Query error: ', '', $message);
			throw new DatabaseException(sprintf('Prepared statement failed: %s', $message, $e->getCode()));
		}
	}
protected function prepared ( $ statement , array & $ bindings = array ( ) ) { $ marks = array ( ) ; $ replacements = array ( ) ; foreach ( $ bindings as $ value ) { $ marks [ ] = '?' ; $ replacements [ ] = $ this -> prepareValue ( $ value ) ; } $ statement = str_replace ( $ marks , $ replacements , $ statement ) ; try { return $ this -> query ( $ statement ) ; } catch ( DatabaseException $ e ) { $ message = $ e -> getMessage ( ) ; $ message = str_replace ( 'Query error: ' , '' , $ message ) ; throw new DatabaseException ( sprintf ( 'Prepared statement failed: %s' , $ message , $ e -> getCode ( ) ) ) ; } }
Executes a prepared statement on the database server and returns the results.
Executes a prepared statement on the database server and returns the results .