public function InsertQuery::from

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

includes/database/query.inc, line 605
Non-specific Database query code. Used by all engines.

Class

InsertQuery
General class for an abstracted INSERT query.

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!query.inc/function/InsertQuery::from/7.x