Yoast\WP\Lib

ORM::build_select_start()protectedYoast 1.0

Builds the start of the SELECT statement.

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

Хуков нет.

Возвращает

Строку.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->build_select_start();

Код ORM::build_select_start() Yoast 22.4

protected function build_select_start() {
	$fragment       = 'SELECT ';
	$result_columns = \implode( ', ', $this->result_columns );
	if ( $this->distinct ) {
		$result_columns = 'DISTINCT ' . $result_columns;
	}
	$fragment .= "{$result_columns} FROM " . $this->quote_identifier( $this->table_name );
	if ( ! \is_null( $this->table_alias ) ) {
		$fragment .= ' ' . $this->quote_identifier( $this->table_alias );
	}

	return $fragment;
}