Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function SelectQuery::__construct

Constructs a Query object.

Parameters

DatabaseConnection $connection: Database connection object.

array $options: Array of query options.

Overrides Query::__construct

File

includes/database/select.inc, line 985

Class

SelectQuery
Query builder for SELECT statements.

Code

public function __construct($table, $alias, DatabaseConnection $connection, $options = array()) {
 $options['return'] = Database::RETURN_STATEMENT;
 parent ::__construct ($connection, $options);
 $this->where  = new DatabaseCondition ('AND');
 $this->having  = new DatabaseCondition ('AND');
 $this->addJoin (NULL, $table, $alias);
}

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