DatabaseConnection::select
public function DatabaseConnection::select
public DatabaseConnection::select($table, $alias = NULL, array $options = array())
Prepares and returns a SELECT query object.
Parameters
$table: The base table for this query, that is, the first table in the FROM clause. This table will also be used as the "base" table for query_alter hook implementations.
$alias: The alias of the base table of this query.
$options: An array of options on the query.
Return value
SelectQueryInterface An appropriate SelectQuery object for this database connection. Note that it may be a driver-specific subclass of SelectQuery, depending on the driver.
See also
File
- includes/database/database.inc, line 811
- Core systems for the database layer.
Class
- DatabaseConnection
- Base Database API class.
Code
public function select($table, $alias = NULL, array $options = array()) { $class = $this->getDriverClass('SelectQuery', array('query.inc', 'select.inc')); return new $class($table, $alias, $this, $options); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!database.inc/function/DatabaseConnection::select/7.x