Yoast\WP\Lib

ORM::raw_query()publicYoast 1.0

Performs a raw query. The query can contain placeholders in either named or question mark style. If placeholders are used, the parameters should be an array of values which will be bound to the placeholders in the query. If this method is called, all other query building methods will be ignored.

Метод класса: ORM{}

Хуков нет.

Возвращает

ORM.

Использование

$ORM = new ORM();
$ORM->raw_query( $query, $parameters );
$query(массив) (обязательный)
The query.
$parameters(массив)
The parameters.
По умолчанию: an empty array

Код ORM::raw_query() Yoast 22.4

public function raw_query( $query, $parameters = [] ) {
	$this->is_raw_query   = true;
	$this->raw_query      = $query;
	$this->raw_parameters = $parameters;

	return $this;
}