function Insert::from

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/Insert.php \Drupal\Core\Database\Query\Insert::from()
  2. 8.9.x core/lib/Drupal/Core/Database/Query/Insert.php \Drupal\Core\Database\Query\Insert::from()
  3. 10 core/lib/Drupal/Core/Database/Query/Insert.php \Drupal\Core\Database\Query\Insert::from()

Sets the fromQuery on this InsertQuery object.

Parameters

\Drupal\Core\Database\Query\SelectInterface $query: The query to fetch the rows that should be inserted.

Return value

$this The called object.

File

core/lib/Drupal/Core/Database/Query/Insert.php, line 45

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.