function db_select
Returns a new SelectQuery object for the active database.
Parameters
$table: The base table for this query. May be a string or another SelectQuery object. If a query object is passed, it will be used as a subselect.
$alias: The alias for the base table of this query.
$options: An array of options to control how the query operates.
Return value
SelectQuery A new SelectQuery object for this connection.
Related topics
115 calls to db_select()
- actions_do in includes/
actions.inc  - Performs a given list of actions by executing their callback functions.
 - AggregatorUpdatePathTestCase::testAggregatorUpdate in modules/
simpletest/ tests/ upgrade/ update.aggregator.test  - Tests that the aggregator.module update is successful.
 - aggregator_feed_items_load in modules/
aggregator/ aggregator.pages.inc  - Loads and optionally filters feed items.
 - book_get_books in modules/
book/ book.module  - Returns an array of all books.
 - book_menu_subtree_data in modules/
book/ book.module  - Gets the data representing a subtree of the book hierarchy.
 
File
- 
              includes/
database/ database.inc, line 2636  
Code
function db_select($table, $alias = NULL, array $options = array()) {
  if (empty($options['target'])) {
    $options['target'] = 'default';
  }
  return Database::getConnection($options['target'])->select($table, $alias, $options);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.