WPSEO_Database_Proxy::update()publicYoast 1.0

Updates data in the database.

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

Хуков нет.

Возвращает

false|int. False when the update request is invalid, int on number of rows changed.

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

$WPSEO_Database_Proxy = new WPSEO_Database_Proxy();
$WPSEO_Database_Proxy->update( $data, $where, $format, $where_format );
$data(массив) (обязательный)
Data to update on the table.
$where(массив) (обязательный)
Where condition as key => value array.
$format(массив|строка|null)
Data prepare format.
По умолчанию: null
$where_format(массив|строка|null)
Where prepare format.
По умолчанию: null

Код WPSEO_Database_Proxy::update() Yoast 22.4

public function update( array $data, array $where, $format = null, $where_format = null ) {
	$this->pre_execution();

	$result = $this->database->update( $this->get_table_name(), $data, $where, $format, $where_format );

	$this->post_execution();

	return $result;
}