public function Insert::from

Sets the fromQuery on this InsertQuery object.

Parameters

SelectQueryInterface $query: The query to fetch the rows that should be inserted.

Return value

InsertQuery The called object.

File

drupal/core/lib/Drupal/Core/Database/Query/Insert.php, line 179
Definition of Drupal\Core\Database\Query\Insert

Class

Insert
General class for an abstracted INSERT query.

Namespace

Drupal\Core\Database\Query

Code

public function from(SelectInterface $query) {
  $this->fromQuery = $query;
  return $this;
}