SelectInterface::havingCondition

public SelectInterface::havingCondition($field, $value = NULL, $operator = NULL) Helper function to build most common HAVING conditional clauses. This method can take a variable number of parameters. If called with two parameters, they are taken as $field and $value with $operator having a value of IN if $value is an array and = otherwise. Parameters $field: The name of the field to check. If you would like to add a more complex condition involving operators or functions, use having(). $value:

SelectInterface::getTables

public &SelectInterface::getTables() Returns a reference to the tables array for this query. Because this method returns by reference, alter hooks may edit the tables array directly to make their changes. If just adding tables, however, the use of the join() methods is preferred. Note that this method must be called by reference as well: $fields =& $query->getTables(); Return value A reference to the tables array structure. File core/lib/Drupal/Core/Database/Query/SelectInterface.p

SelectInterface::having

public SelectInterface::having($snippet, $args = array()) Adds an arbitrary HAVING clause to the query. Parameters $snippet: A portion of a HAVING clause as a prepared statement. It must use named placeholders, not ? placeholders. $args: (optional) An associative array of arguments. Return value $this File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 577 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code pu

SelectInterface::getGroupBy

public &SelectInterface::getGroupBy() Returns a reference to the group-by array for this query. Because this method returns by reference, alter hooks may edit the group-by array directly to make their changes. If just adding additional grouping fields, however, the use of groupBy() is preferred. Note that this method must be called by reference as well: $fields =& $query->getGroupBy(); Return value A reference to the group-by array structure. File core/lib/Drupal/Core/Database/Quer

SelectInterface::getOrderBy

public &SelectInterface::getOrderBy() Returns a reference to the order by array for this query. Because this method returns by reference, alter hooks may edit the order-by array directly to make their changes. If just adding additional ordering fields, however, the use of orderBy() is preferred. Note that this method must be called by reference as well: $fields =& $query->getOrderBy(); Return value A reference to the expression array structure. File core/lib/Drupal/Core/Database/Qu

SelectInterface::groupBy

public SelectInterface::groupBy($field) Groups the result set by the specified field. Parameters $field: The field on which to group. This should be the field as aliased. Return value \Drupal\Core\Database\Query\SelectInterface The called object. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 488 Class SelectInterface Interface definition for a Select Query object. Namespace Drupal\Core\Database\Query Code public function groupBy($field);

SelectInterface::getUnion

public &SelectInterface::getUnion() Returns a reference to the union queries for this query. This include queries for UNION, UNION ALL, and UNION DISTINCT. Because this method returns by reference, alter hooks may edit the tables array directly to make their changes. If just adding union queries, however, the use of the union() method is preferred. Note that this method must be called by reference as well: $fields =& $query->getUnion(); Return value A reference to the union query a

SelectInterface::fields

public SelectInterface::fields($table_alias, array $fields = array()) Add multiple fields from the same table to be SELECTed. This method does not return the aliases set for the passed fields. In the majority of cases that is not a problem, as the alias will be the field name. However, if you do need to know the alias you can call getFields() and examine the result to determine what alias was created. Alternatively, simply use addField() for the few fields you care about and this method for the

SelectInterface::getArguments

public SelectInterface::getArguments(PlaceholderInterface $queryPlaceholder = NULL) Compiles and returns an associative array of the arguments for this prepared statement. Parameters $queryPlaceholder: When collecting the arguments of a subquery, the main placeholder object should be passed as this parameter. Return value An associative array of all placeholder arguments for this query. File core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 163 Class SelectInterface Interface

SelectInterface::getExpressions

public &SelectInterface::getExpressions() Returns a reference to the expressions array for this query. Because this method returns by reference, alter hooks may edit the expressions array directly to make their changes. If just adding expressions, however, the use of addExpression() is preferred. Note that this method must be called by reference as well: $fields =& $query->getExpressions(); Return value A reference to the expression array structure. File core/lib/Drupal/Core/Databa