1.16.x database.inc public DatabaseConnection::insert($table, array $options = array())
1.18.x database.inc public DatabaseConnection::insert($table, array $options = array())
1.17.x database.inc public DatabaseConnection::insert($table, array $options = array())

Prepares and returns an INSERT query object.

Parameters

$options: An array of options on the query.

Return value

InsertQuery: A new InsertQuery object.

See also

InsertQuery

File

includes/database/database.inc, line 877
Core systems for the database layer.

Class

DatabaseConnection
Base Database API class.

Code

public function insert($table, array $options = array()) {
  $class = $this->getDriverClass('InsertQuery', array('query.inc'));
  return new $class($this, $table, $options);
}