db_select

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 db_select($table, $alias = NULL, array $options = array())

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

▾ 244 functions call db_select()

actions_do in includes/actions.inc
Performs a given list of actions by executing their callback functions.
batch_example_lowest_nid in examples/batch_example/batch_example.module
Utility function - simply queries and loads the lowest nid.
batch_example_op_2 in examples/batch_example/batch_example.module
Batch operation for batch 2 : load all nodes, 5 by five After each group of 5 control is returned to the batch API for later continuation.
batch_example_update_7100 in examples/batch_example/batch_example.install
Example of batch-driven update function.
blog_block_view in modules/blog/blog.module
Implements hook_block_view().
blog_feed_last in modules/blog/blog.pages.inc
Menu callback; displays an RSS feed containing recent blog entries of all users.
blog_feed_user in modules/blog/blog.pages.inc
Menu callback; displays an RSS feed containing recent blog entries of a given user.
blog_page_last in modules/blog/blog.pages.inc
Menu callback; displays a Drupal page containing recent blog entries of all users.
blog_page_user in modules/blog/blog.pages.inc
Menu callback; displays a Drupal page containing recent blog entries of a given user.
book_block_view in modules/book/book.module
Implements hook_block_view().
book_get_books in modules/book/book.module
Returns an array of all books.
book_menu_subtree_data in modules/book/book.module
Get the data representing a subtree of the book hierarchy.
book_update_bid in modules/book/book.module
Update the bid for a page and its children when it is moved to a new book.
CategorizeFeedItemTestCase::testCategorizeFeedItem in modules/aggregator/aggregator.test
If a feed has a category, make sure that the children inherit that categorization.
comment_admin_overview in modules/comment/comment.admin.inc
Form builder for the comment overview administration form.
comment_enable in modules/comment/comment.install
Implements hook_enable().
comment_form_validate in modules/comment/comment.module
Validate comment form submissions.
comment_get_display_ordinal in modules/comment/comment.module
Get the display ordinal for a comment, starting from 0.
comment_get_recent in modules/comment/comment.module
Find the most recent comments that are available to the current user.
comment_get_thread in modules/comment/comment.module
Retrieve comments for a thread.
comment_new_page_count in modules/comment/comment.module
Calculate page number for first new comment.
comment_update_7006 in modules/comment/comment.install
Migrate data from the comment field to field storage.
contact_category_edit_form_validate in modules/contact/contact.admin.inc
Validate the contact category edit page form submission.
contact_category_list in modules/contact/contact.admin.inc
Categories/list tab.
contact_load in modules/contact/contact.module
Load a contact category.
contact_site_form in modules/contact/contact.pages.inc
Form builder; the site-wide contact form.
dashboard_disable in modules/dashboard/dashboard.install
Implements hook_disable().
dashboard_page_build in modules/dashboard/dashboard.module
Implements hook_page_build().
DatabaseAlterTestCase::testAlterChangeConditional in modules/simpletest/tests/database_test.test
Test that we can alter a query's conditionals.
DatabaseAlterTestCase::testAlterChangeFields in modules/simpletest/tests/database_test.test
Test that we can alter the fields of a query.
DatabaseAlterTestCase::testAlterExpression in modules/simpletest/tests/database_test.test
Test that we can alter expressions in the query.
DatabaseAlterTestCase::testAlterRemoveRange in modules/simpletest/tests/database_test.test
Test that we can remove a range() value from a query. This also tests hook_query_TAG_alter().
DatabaseAlterTestCase::testAlterWithJoin in modules/simpletest/tests/database_test.test
Test that we can alter the joins on a query.
DatabaseAlterTestCase::testSimpleAlter in modules/simpletest/tests/database_test.test
Test that we can do basic alters.
DatabaseAlterTestCase::testSimpleAlterSubquery in modules/simpletest/tests/database_test.test
Test that we can do basic alters on subqueries.
DatabaseBasicSyntaxTestCase::testLikeBackslash in modules/simpletest/tests/database_test.test
Test LIKE query containing a backslash.
DatabaseBasicSyntaxTestCase::testLikeEscape in modules/simpletest/tests/database_test.test
Test escaping of LIKE wildcards.
DatabaseDeleteTruncateTestCase::testSubselectDelete in modules/simpletest/tests/database_test.test
Confirm that we can use a subselect in a delete successfully.
DatabaseInsertTestCase::testInsertSelect in modules/simpletest/tests/database_test.test
Test that the INSERT INTO ... SELECT ... syntax works.
DatabaseInvalidDataTestCase::testInsertDuplicateData in modules/simpletest/tests/database_test.test
Traditional SQL database systems abort inserts when invalid data is encountered.
DatabaseSelectComplexTestCase2::testJoinSubquery in modules/simpletest/tests/database_test.test
Test that we can join on a query.
DatabaseSelectComplexTestCase::testCountQuery in modules/simpletest/tests/database_test.test
Test that we can generate a count query from a built query.
DatabaseSelectComplexTestCase::testCountQueryDistinct in modules/simpletest/tests/database_test.test
Test that we can generate a count query from a query with distinct.
DatabaseSelectComplexTestCase::testCountQueryFieldRemovals in modules/simpletest/tests/database_test.test
Test that countQuery properly removes fields and expressions.
DatabaseSelectComplexTestCase::testCountQueryGroupBy in modules/simpletest/tests/database_test.test
Test that we can generate a count query from a query with GROUP BY.
DatabaseSelectComplexTestCase::testCountQueryRemovals in modules/simpletest/tests/database_test.test
Test that countQuery properly removes 'all_fields' statements and ordering clauses.
DatabaseSelectComplexTestCase::testDefaultJoin in modules/simpletest/tests/database_test.test
Test simple JOIN statements.
DatabaseSelectComplexTestCase::testDistinct in modules/simpletest/tests/database_test.test
Test distinct queries.
DatabaseSelectComplexTestCase::testGroupBy in modules/simpletest/tests/database_test.test
Test GROUP BY clauses.
DatabaseSelectComplexTestCase::testGroupByAndHaving in modules/simpletest/tests/database_test.test
Test GROUP BY and HAVING clauses together.
DatabaseSelectComplexTestCase::testJoinTwice in modules/simpletest/tests/database_test.test
Confirm we can join on a single table twice with a dynamic alias.
DatabaseSelectComplexTestCase::testLeftOuterJoin in modules/simpletest/tests/database_test.test
Test LEFT OUTER joins.
DatabaseSelectComplexTestCase::testNestedConditions in modules/simpletest/tests/database_test.test
Confirm that we can properly nest conditional clauses.
DatabaseSelectComplexTestCase::testRange in modules/simpletest/tests/database_test.test
Test range queries. The SQL clause varies with the database.
DatabaseSelectOrderedTestCase::testSimpleSelectMultiOrdered in modules/simpletest/tests/database_test.test
Test multiple order by.
DatabaseSelectOrderedTestCase::testSimpleSelectOrdered in modules/simpletest/tests/database_test.test
Test basic order by.
DatabaseSelectOrderedTestCase::testSimpleSelectOrderedDesc in modules/simpletest/tests/database_test.test
Test order by descending.
DatabaseSelectPagerDefaultTestCase::testElementNumbers in modules/simpletest/tests/database_test.test
Confirm that every pager gets a valid non-overlaping element ID.
DatabaseSelectPagerDefaultTestCase::testHavingPagerQuery in modules/simpletest/tests/database_test.test
Confirm that a paging query with a having expression returns valid results.
DatabaseSelectPagerDefaultTestCase::testInnerPagerQuery in modules/simpletest/tests/database_test.test
Confirm that a pager query with inner pager query returns valid results.
DatabaseSelectSubqueryTestCase::testConditionSubquerySelect in modules/simpletest/tests/database_test.test
Test that we can use a subquery in a WHERE clause.
DatabaseSelectSubqueryTestCase::testExistsSubquerySelect in modules/simpletest/tests/database_test.test
Test EXISTS subquery conditionals on SELECT statements.
DatabaseSelectSubqueryTestCase::testFromSubquerySelect in modules/simpletest/tests/database_test.test
Test that we can use a subquery in a FROM clause.
DatabaseSelectSubqueryTestCase::testFromSubquerySelectWithLimit in modules/simpletest/tests/database_test.test
Test that we can use a subquery in a FROM clause with a limit.
DatabaseSelectSubqueryTestCase::testJoinSubquerySelect in modules/simpletest/tests/database_test.test
Test that we can use a subquery in a JOIN clause.
DatabaseSelectSubqueryTestCase::testNotExistsSubquerySelect in modules/simpletest/tests/database_test.test
Test NOT EXISTS subquery conditionals on SELECT statements.
DatabaseSelectTestCase::testNotNullCondition in modules/simpletest/tests/database_test.test
Test that we can find a record without a NULL value.
DatabaseSelectTestCase::testNullCondition in modules/simpletest/tests/database_test.test
Test that we can find a record with a NULL value.
DatabaseSelectTestCase::testRandomOrder in modules/simpletest/tests/database_test.test
Test that random ordering of queries works.
DatabaseSelectTestCase::testSelectDuplicateAlias in modules/simpletest/tests/database_test.test
Test that aliases are renamed when duplicates.
DatabaseSelectTestCase::testSimpleComment in modules/simpletest/tests/database_test.test
Test rudimentary SELECT statement with a COMMENT.
DatabaseSelectTestCase::testSimpleSelect in modules/simpletest/tests/database_test.test
Test rudimentary SELECT statements.
DatabaseSelectTestCase::testSimpleSelectAllFields in modules/simpletest/tests/database_test.test
Test adding all fields from a given table to a select statement.
DatabaseSelectTestCase::testSimpleSelectConditional in modules/simpletest/tests/database_test.test
Test basic conditionals on SELECT statements.
DatabaseSelectTestCase::testSimpleSelectExpression in modules/simpletest/tests/database_test.test
Test SELECT statements with expressions.
DatabaseSelectTestCase::testSimpleSelectExpressionMultiple in modules/simpletest/tests/database_test.test
Test SELECT statements with multiple expressions.
DatabaseSelectTestCase::testSimpleSelectMultipleFields in modules/simpletest/tests/database_test.test
Test adding multiple fields to a select statement at the same time.
DatabaseSelectTestCase::testUnion in modules/simpletest/tests/database_test.test
Test that we can UNION multiple Select queries together. This is semantically equal to UNION DISTINCT, so we don't explicity test that.
DatabaseSelectTestCase::testUnionAll in modules/simpletest/tests/database_test.test
Test that we can UNION ALL multiple Select queries together.
DatabaseSelectTestCase::testVulnerableComment in modules/simpletest/tests/database_test.test
Test query COMMENT system against vulnerabilities.
DatabaseSerializeQueryTestCase::testSerializeQuery in modules/simpletest/tests/database_test.test
Confirm that a query can be serialized and unserialized.
DatabaseTaggingTestCase::testHasAllTags in modules/simpletest/tests/database_test.test
Test query tagging "has all of these tags" functionality.
DatabaseTaggingTestCase::testHasAnyTag in modules/simpletest/tests/database_test.test
Test query tagging "has at least one of these tags" functionality.
DatabaseTaggingTestCase::testHasTag in modules/simpletest/tests/database_test.test
Confirm that a query has a "tag" added to it.
DatabaseTaggingTestCase::testMetaData in modules/simpletest/tests/database_test.test
Test that we can attach meta data to a query object.
DatabaseTemporaryQueryTestCase::countTableRows in modules/simpletest/tests/database_test.test
Return the number of rows of a table.
database_test_db_query_temporary in modules/simpletest/tests/database_test.module
Run a db_query_temporary and output the table name and its number of rows.
database_test_even_pager_query in modules/simpletest/tests/database_test.module
Run a pager query and return the results.
database_test_odd_pager_query in modules/simpletest/tests/database_test.module
Run a pager query and return the results.
database_test_tablesort in modules/simpletest/tests/database_test.module
Run a tablesort query and return the results.
database_test_tablesort_first in modules/simpletest/tests/database_test.module
Run a tablesort query with a second order_by after and return the results.
database_test_theme_tablesort in modules/simpletest/tests/database_test.module
Output a form without setting a header sort.
DateTimeFunctionalTest::testDateFormatStorage in modules/system/system.test
Test if the date formats are stored properly.
dblog_cron in modules/dblog/dblog.module
Implements hook_cron().
dblog_overview in modules/dblog/dblog.admin.inc
Menu callback; displays a listing of log messages.
dblog_top in modules/dblog/dblog.admin.inc
Menu callback; generic function to display a page of the most frequent events.
dbtng_example_advanced_list in examples/dbtng_example/dbtng_example.module
Render a filtered list of entries in the database.
dbtng_example_entry_load in examples/dbtng_example/dbtng_example.module
Read from the database using a filter array.
DrupalDatabaseCache::isEmpty in includes/cache.inc
Check if a cache bin is empty.
DrupalDefaultEntityController::buildQuery in includes/entity.inc
Builds the query to load the entity.
EntityFieldQuery::propertyQuery in includes/entity.inc
Queries entity tables in SQL for property conditions and sorts.
FieldCrudTestCase::testCreateFieldFail in modules/field/tests/field.test
Test failure to create a field.
FieldSqlStorageTestCase::testFieldAttachInsertAndUpdate in modules/field/modules/field_sql_storage/field_sql_storage.test
Reads mysql to verify correct data is written when using insert and update.
FieldSqlStorageTestCase::testFieldAttachSaveMissingData in modules/field/modules/field_sql_storage/field_sql_storage.test
Tests insert and update with missing or NULL fields.
field_read_fields in modules/field/field.crud.inc
Reads in fields that match an array of conditions.
field_read_instances in modules/field/field.crud.inc
Reads in field instances that match an array of conditions.
field_sql_storage_field_storage_load in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_load().
field_sql_storage_field_storage_query in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_query().
field_sql_storage_update_7001 in modules/field/modules/field_sql_storage/field_sql_storage.install
Remove the field_config_entity_type table and store 'entity_type' strings.
field_sql_storage_update_7002 in modules/field/modules/field_sql_storage/field_sql_storage.install
Fix primary keys in field revision data tables.
field_test_entity_test_load in modules/field/tests/field_test.entity.inc
Loads a test_entity.
FileUsageTest::testAddUsage in modules/simpletest/tests/file.test
Tests file_usage_add().
FileUsageTest::testRemoveUsage in modules/simpletest/tests/file.test
Tests file_usage_delete().
file_space_used in includes/file.inc
Determine total disk space used by a single user or the whole filesystem.
file_usage_list in includes/file.inc
Determines where a file is used.
FilterCRUDTestCase::verifyTextFormat in modules/filter/filter.test
Verify that a text format is properly stored.
filter_formats in modules/filter/filter.module
Retrieve a list of text formats, ordered by weight.
filter_update_7003 in modules/filter/filter.install
Upgrade the {filter} table for core filters.
forum_block_view in modules/forum/forum.module
Implements hook_block_view().
forum_forum_load in modules/forum/forum.module
Returns a tree of all forums for a given taxonomy term ID.
forum_get_topics in modules/forum/forum.module
forum_node_load in modules/forum/forum.module
Implements hook_node_load().
forum_update_7001 in modules/forum/forum.install
Create new {forum_index} table.
forum_update_7003 in modules/forum/forum.install
Rename field to 'taxonomy_forums'.
hook_field_storage_load in modules/field/field.api.php
Load field data for a set of entities.
hook_field_storage_query in modules/field/field.api.php
Execute an EntityFieldQuery.
hook_search_execute in modules/search/search.api.php
Execute a search for a set of key words.
hook_update_N in modules/system/system.api.php
Perform a single update.
hook_user_cancel in modules/user/user.api.php
Act on user account cancellations.
image_effects in modules/image/image.module
Load all image effects from the database.
image_styles in modules/image/image.module
Get an array of all styles and their settings.
LocaleCommentLanguageFunctionalTest::testCommentLanguage in modules/locale/locale.test
Test that comment language is properly set.
LocaleTranslationFunctionalTest::testJavaScriptTranslation in modules/locale/locale.test
locale_batch_by_language in includes/locale.inc
Prepare a batch to import translations for all enabled modules in a given language.
MenuRouterTestCase::testMenuHidden in modules/simpletest/tests/menu.test
Tests menu link depth and parents of local tasks and menu callbacks.
menu_contextual_links in includes/menu.inc
Retrieve contextual links for a system object based on registered local tasks.
menu_get_names in includes/menu.inc
Build a list of named menus.
menu_link_children_relative_depth in includes/menu.inc
Find the depth of an item's children relative to its depth.
menu_link_get_preferred in includes/menu.inc
Lookup the preferred menu link for a given system path.
menu_link_load in includes/menu.inc
Get a menu link by its mlid, access checked and link translated for rendering.
menu_load_links in includes/menu.inc
Returns an array containing all links for a menu.
menu_local_tasks in includes/menu.inc
Collects the local tasks (tabs), action links, and the root path.
menu_tree_check_access in includes/menu.inc
Check access and perform other dynamic operations for each link in the tree.
menu_tree_page_data in includes/menu.inc
Get the data structure representing a named menu tree, based on the current page.
ModuleTestCase::assertLogMessage in modules/system/system.test
Verify a log entry was entered for a module's status change. Called in the same way of the expected original watchdog() execution.
NodeAdminTestCase::testContentAdminSort in modules/node/node.test
Tests that the table sorting works on the content admin pages.
nodeapi_example_node_load in examples/nodeapi_example/nodeapi_example.module
Implements hook_node_load().
nodeapi_example_node_update in examples/nodeapi_example/nodeapi_example.module
Implements hook_node_update().
nodeapi_example_uninstall in examples/nodeapi_example/nodeapi_example.install
Implements hook_uninstall().
NodeQueryAlter::testNodeQueryAlterLowLevelEditAccess in modules/node/node.test
Lower-level test of 'node_access' query alter, for edit access.
NodeQueryAlter::testNodeQueryAlterLowLevelNoAccess in modules/node/node.test
Lower-level test of 'node_access' query alter, for user without access.
NodeQueryAlter::testNodeQueryAlterLowLevelWithAccess in modules/node/node.test
Lower-level test of 'node_access' query alter, for user with access.
NodeQueryAlter::testNodeQueryAlterOverride in modules/node/node.test
Lower-level test of 'node_access' query alter override.
node_access in modules/node/node.module
Determine whether the current user may perform the given operation on the specified node.
node_access_example_private_node_listing in examples/node_access_example/node_access_example.module
Our hook_menu() page callback function.
node_access_test_page in modules/node/tests/node_access_test.module
Page callback for node access test page.
node_access_view_all_nodes in modules/node/node.module
Determines whether the user has a global viewing grant for all nodes.
node_admin_nodes in modules/node/node.admin.inc
Form builder: Builds the node administration overview.
node_feed in modules/node/node.module
Generates and prints an RSS feed.
node_get_recent in modules/node/node.module
Finds the most recently changed nodes that are available to the current user.
node_page_default in modules/node/node.module
Menu callback; Generate a listing of promoted nodes.
node_search_execute in modules/node/node.module
Implements hook_search_execute().
node_update_7000 in modules/node/node.install
Upgrade the node type table and fix node type 'module' attribute to avoid name-space conflicts.
node_update_7006 in modules/node/node.install
Convert body and teaser from node properties to fields, and migrate status/comment/promote and sticky columns to the {node_revision} table.
node_user_cancel in modules/node/node.module
Implements hook_user_cancel().
node_user_delete in modules/node/node.module
Implements hook_user_delete().
pager_example_page in examples/pager_example/pager_example.module
Build the pager query
path_admin_overview in modules/path/path.admin.inc
Return a listing of all defined URL aliases.
path_form_element_validate in modules/path/path.module
Form element validation handler for URL alias form element.
path_load in includes/path.inc
Fetch a specific URL alias from the database.
poll_block_view in modules/poll/poll.module
Implements hook_block_view().
poll_load in modules/poll/poll.module
Implements hook_load().
poll_page in modules/poll/poll.pages.inc
Menu callback to provide a simple list of all polls available.
poll_votes in modules/poll/poll.pages.inc
Callback for the 'votes' tab for polls you can see other votes on
profile_admin_settings_autocomplete in modules/profile/profile.admin.inc
Retrieve a pipe delimited string of autocomplete suggestions for profile categories
profile_autocomplete in modules/profile/profile.pages.inc
Callback to allow autocomplete of profile text fields.
profile_browse in modules/profile/profile.pages.inc
Menu callback; display a list of user information.
profile_field_form_validate in modules/profile/profile.admin.inc
Validate profile_field_form submissions.
SchemaTestCase::assertFieldCharacteristics in modules/simpletest/tests/schema.test
Assert that a newly added field has the correct characteristics.
SearchMatchTestCase::_testQueries in modules/search/search.test
Run predefine queries looking for indexed terms.
SearchQuery::countQuery in modules/search/search.extender.inc
Builds the default count query for SearchQuery.
shortcut_current_displayed_set in modules/shortcut/shortcut.module
Returns the current displayed shortcut set for the provided user account.
shortcut_sets in modules/shortcut/shortcut.module
Returns an array of all shortcut sets, keyed by the set name.
shortcut_set_load in modules/shortcut/shortcut.module
Loads the data for a shortcut set.
simpletest_result_get in modules/simpletest/simpletest.pages.inc
Get test results for $test_id.
StatisticsAdminTestCase::testDeleteNode in modules/statistics/statistics.test
Tests that when a node is deleted, the node counter is deleted too.
StatisticsAdminTestCase::testExpiredLogs in modules/statistics/statistics.test
Tests that cron clears day counts and expired access logs.
statistics_node_tracker in modules/statistics/statistics.pages.inc
statistics_recent_hits in modules/statistics/statistics.admin.inc
Menu callback; presents the "recent hits" page.
statistics_title_list in modules/statistics/statistics.module
Returns all time or today top or last viewed node(s).
statistics_top_pages in modules/statistics/statistics.admin.inc
Menu callback; presents the "top pages" page.
statistics_top_referrers in modules/statistics/statistics.admin.inc
Menu callback; presents the "referrer" page.
statistics_top_visitors in modules/statistics/statistics.admin.inc
Menu callback; presents the "top visitors" page.
statistics_user_tracker in modules/statistics/statistics.pages.inc
system_actions_manage in modules/system/system.admin.inc
Menu callback; Displays an overview of available and configured actions.
system_admin_menu_block in modules/system/system.module
Provide a single block on the administration overview page.
system_get_module_admin_tasks in modules/system/system.module
Generate a list of tasks offered by a specified module.
system_update_7061 in modules/system/system.install
Migrate upload.module data to the newly created file field.
tablesort_example_page in examples/tablesort_example/tablesort_example.module
Build the table render array.
taxonomy_autocomplete in modules/taxonomy/taxonomy.pages.inc
Helper function for autocompletion
taxonomy_get_children in modules/taxonomy/taxonomy.module
Finds all children of a term ID.
taxonomy_get_parents in modules/taxonomy/taxonomy.module
Finds all parents of a given term ID.
taxonomy_get_tree in modules/taxonomy/taxonomy.module
Create a hierarchical representation of a vocabulary.
taxonomy_select_nodes in modules/taxonomy/taxonomy.module
Return nodes attached to a term across all field instances.
taxonomy_test_get_antonym in modules/simpletest/tests/taxonomy_test.module
Return the antonym of the given term ID.
taxonomy_tokens in modules/taxonomy/taxonomy.tokens.inc
Implements hook_tokens().
taxonomy_update_7005 in modules/taxonomy/taxonomy.install
Migrate {taxonomy_term_node} table to field storage.
tracker_cron in modules/tracker/tracker.module
Implements hook_cron().
tracker_page in modules/tracker/tracker.pages.inc
Menu callback; prints a listing of active nodes on the site.
translation_node_get_translations in modules/translation/translation.module
Get all nodes in a translation set, represented by $tnid.
update_fix_d7_block_deltas in includes/update.inc
A helper function that modules can use to assist with the transformation from numeric block deltas to string block deltas during the 6.x -> 7.x upgrade.
update_fix_d7_install_profile in includes/update.inc
Register the currently installed profile in the system table.
UpgradePathTaxonomyTestCase::testTaxonomyUpgrade in modules/simpletest/tests/upgrade/upgrade.taxonomy.test
Basic tests for the taxonomy upgrade.
user_account_form_validate in modules/user/user.module
Form validation handler for user_account_form().
user_admin_account in modules/user/user.admin.inc
Form builder; User administration page.
user_autocomplete in modules/user/user.pages.inc
Menu callback; Retrieve a JSON object containing autocomplete suggestions for existing users.
user_is_blocked in modules/user/user.module
Checks for usernames blocked by user administration.
user_roles in modules/user/user.module
Retrieve an array of roles matching specified conditions.
user_role_load in modules/user/user.module
Fetches a user role by role ID.
user_role_load_by_name in modules/user/user.module
Fetches a user role by role name.
user_role_save in modules/user/user.module
Save a user role to the database.
user_search_execute in modules/user/user.module
Implements hook_search_execute().
user_update_7017 in modules/user/user.install
Update email templates to use new tokens.
_block_load_blocks in modules/block/block.module
Load blocks information from the database.
_block_rehash in modules/block/block.module
Update the 'block' DB table with the blocks currently exported by modules.
_blog_post_exists in modules/blog/blog.module
Helper function to determine if a user has blog posts already.
_forum_topics_unread in modules/forum/forum.module
Calculate the number of nodes the user has not yet read and are newer than NODE_NEW_LIMIT.
_locale_translate_seek in includes/locale.inc
Perform a string search and display results in a table
_menu_build_tree in includes/menu.inc
Build a menu tree.
_menu_find_router_path in includes/menu.inc
Find the router path which will serve this path.
_menu_link_find_parent in includes/menu.inc
Find a possible parent for a given menu link.
_menu_navigation_links_rebuild in includes/menu.inc
Helper function to build menu links for the items in the menu router.
_menu_update_parental_status in includes/menu.inc
Check and update the has_children status for the parent of a link.
_node_types_build in modules/node/node.module
Builds and returns the list of available node types.
_profile_get_fields in modules/profile/profile.module
_rdf_mapping_load in modules/rdf/rdf.module
Helper function to retrieve an RDF mapping from the database.
_token_example_get_comment in examples/token_example/token_example.module
Builds a list of available comments.
_token_example_get_file in examples/token_example/token_example.module
Builds a list of available files.
_token_example_get_node in examples/token_example/token_example.module
Builds a list of available content.
_token_example_get_taxonomy_term in examples/token_example/token_example.module
Builds a list of available taxonomy terms.
_token_example_get_user in examples/token_example/token_example.module
Builds a list of available user accounts.
_update_7000_field_delete_field in modules/field/field.install
Utility function: delete a field stored in SQL storage directly from the database.
_update_7000_field_read_fields in modules/field/field.install
Utility function: fetch all the field definitions from the database.
_update_get_cache_multiple in modules/update/update.module
Return an array of cache items with a given cache ID prefix.

Code

includes/database/database.inc, line 2485

<?php
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);
}
?>