1 query.inc public DeleteQuery::__construct(DatabaseConnection $connection, $table, array $options = array())

Constructs a DeleteQuery 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

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

Class

DeleteQuery
General class for an abstracted DELETE operation.

Code

public function __construct(DatabaseConnection $connection, $table, array $options = array()) {
  $options['return'] = Database::RETURN_AFFECTED;
  parent::__construct($connection, $options);
  $this->table = $table;

  $this->condition = new DatabaseCondition('AND');
}