public function SelectQueryExtender::union

cis7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')
cle7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')
elmsmedia7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')
icor7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')
meedjum_blog7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')
mooc7 select.inc public SelectQueryExtender::union(SelectQueryInterface $query, $type = '')

Add another Select query to UNION to this one.

Union queries consist of two or more queries whose results are effectively concatenated together. Queries will be UNIONed in the order they are specified, with this object's query coming first. Duplicate columns will be discarded. All forms of UNION are supported, using the second '$type' argument.

Note: All queries UNIONed together must have the same field structure, in the same order. It is up to the caller to ensure that they match properly. If they do not, an SQL syntax error will result.

Parameters

$query: The query to UNION to this query.

$type: The type of UNION to add to the query. Defaults to plain UNION.

Return value

SelectQueryInterface The called object.

Overrides SelectQueryInterface::union

File

includes/database/select.inc, line 779

Class

SelectQueryExtender
The base extender class for Select queries.

Code

public function union(SelectQueryInterface $query, $type = '') {
  $this->query->union($query, $type);
  return $this;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.