Skip navigation
Help

InsertQuery::from

7 query.inc public InsertQuery::from(SelectQueryInterface $query)

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/includes/database/query.inc, line 565
Non-specific Database query code. Used by all engines.

Code

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