Select::orderBy

public Select::orderBy($field, $direction = 'ASC') Overrides SelectQuery::orderBy(). PostgreSQL adheres strictly to the SQL-92 standard and requires that when using DISTINCT or GROUP BY conditions, fields and expressions that are ordered on also need to be selected. This is a best effort implementation to handle the cases that can be automated by adding the field if it is not yet selected. $query = db_select('example', 'e'); $query->join('example_revision', 'er', 'e.vid = er.vid'); $qu

Select::orderRandom

public Select::orderRandom() Orders the result set by a random value. This may be stacked with other orderBy() calls. If so, the query will order by each specified field, including this one, in the order called. Although this method may be called multiple times on the same query, doing so is not particularly useful. Note: The method used by most drivers may not scale to very large result sets. If you need to work with extremely large data sets, you may create your own database driver by subclas

Select::orderBy

public Select::orderBy($field, $direction = 'ASC') Orders the result set by a given field. If called multiple times, the query will order by each specified field in the order this method is called. If the query uses DISTINCT or GROUP BY conditions, fields or expressions that are used for the order must be selected to be compatible with some databases like PostgreSQL. The PostgreSQL driver can handle simple cases automatically but it is suggested to explicitly specify them. Additionally, when or

Select::orderRandom

public Select::orderRandom() Orders the result set by a random value. This may be stacked with other orderBy() calls. If so, the query will order by each specified field, including this one, in the order called. Although this method may be called multiple times on the same query, doing so is not particularly useful. Note: The method used by most drivers may not scale to very large result sets. If you need to work with extremely large data sets, you may create your own database driver by subclas

Select::leftJoin

public Select::leftJoin($table, $alias = NULL, $condition = NULL, $arguments = array()) Left Outer Join against another table in the database. Parameters $table: The table against which to join. May be a string or another SelectQuery object. If a query object is passed, it will be used as a subselect. Unless the table name starts with the database / schema name and a dot it will be prefixed. $alias: The alias for the table. In most cases this should be the first letter of the table, or the fir

Select::havingIsNotNull

public Select::havingIsNotNull($field) Sets a condition in the HAVING clause that the specified field be NOT NULL. Parameters $field: The name of the field to check. Return value $this Overrides SelectInterface::havingIsNotNull File core/lib/Drupal/Core/Database/Query/Select.php, line 338 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function havingIsNotNull($field) { $this->having->isNotNull($field); return $this; }

Select::join

public Select::join($table, $alias = NULL, $condition = NULL, $arguments = array()) Default Join against another table in the database. This method is a convenience method for innerJoin(). Parameters $table: The table against which to join. May be a string or another SelectQuery object. If a query object is passed, it will be used as a subselect. Unless the table name starts with the database / schema name and a dot it will be prefixed. $alias: The alias for the table. In most cases this shoul

Select::havingNotExists

public Select::havingNotExists(SelectInterface $select) Sets a HAVING condition that the specified subquery returns no values. Parameters \Drupal\Core\Database\Query\SelectInterface $select: The subquery that must contain results. Return value $this Overrides SelectInterface::havingNotExists File core/lib/Drupal/Core/Database/Query/Select.php, line 354 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function havingNotExists(SelectInt

Select::havingIsNull

public Select::havingIsNull($field) Sets a condition in the HAVING clause that the specified field be NULL. Parameters $field: The name of the field to check. Return value $this Overrides SelectInterface::havingIsNull File core/lib/Drupal/Core/Database/Query/Select.php, line 330 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function havingIsNull($field) { $this->having->isNull($field); return $this; }

Select::isPrepared

public Select::isPrepared() Indicates if preExecute() has already been called on that object. Return value TRUE is this query has already been prepared, FALSE otherwise. Overrides SelectInterface::isPrepared File core/lib/Drupal/Core/Database/Query/Select.php, line 439 Class Select Query builder for SELECT statements. Namespace Drupal\Core\Database\Query Code public function isPrepared() { return $this->prepared; }