public function InsertQuery::__construct in Drupal 7
Constructs an InsertQuery object.
Parameters
DatabaseConnection $connection: A DatabaseConnection object.
string $table: Name of the table to associate with this query.
array $options: Array of database options.
Overrides Query::__construct
File
- includes/
database/ query.inc, line 498 - Non-specific Database query code. Used by all engines.
Class
- InsertQuery
- General class for an abstracted INSERT query.
Code
public function __construct($connection, $table, array $options = array()) {
if (!isset($options['return'])) {
$options['return'] = Database::RETURN_INSERT_ID;
}
parent::__construct($connection, $options);
$this->table = $table;
}