db_select

Versions
mediamosa-21
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

▾ 144 functions call db_select()

actions_do in includes/actions.inc
Performs a given list of actions by executing their callback functions.
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.
comment_admin_overview in modules/comment/comment.admin.inc
Form builder; Builds the comment overview form for the admin.
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_7013 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_page_build in modules/dashboard/dashboard.module
Implements hook_page_build().
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.
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 dblog events of a specified type.
devel_generate_content_kill in sites/all/modules/devel/devel_generate.inc
Handle the devel_generate_content_form request to kill all of the content. This is used by both the batch and non-batch branches of the code.
devel_variable_form in sites/all/modules/devel/devel.module
drupal_uninstall_modules in includes/install.inc
Calls the uninstall function and updates the system table for a given module.
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_test_entity_test_load in modules/field/tests/field_test.entity.inc
Loads a test_entity.
file_space_used in includes/file.inc
Determine total disk space used by a single user or the whole filesystem.
filter_formats in modules/filter/filter.module
Retrieve a list of text formats, ordered by weight.
forum_block_view in modules/forum/forum.module
Implements hook_block_view().
forum_get_forums in modules/forum/forum.module
Returns a list of all forums for a given taxonomy id
forum_get_topics in modules/forum/forum.module
forum_node_load in modules/forum/forum.module
Implements hook_node_load().
hook_field_attach_form in modules/field/field.api.php
Act on field_attach_form.
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.
locale_batch_by_language in includes/locale.inc
Prepare a batch to import translations for all enabled modules in a given language.
mediamosa_integrity_check_page in sites/all/modules/mediamosa/modules/integrity_check/mediamosa_integrity_check.module
Integrity check page / list.
mediamosa_integrity_check_print_errors in sites/all/modules/mediamosa/modules/integrity_check/mediamosa_integrity_check.module
List of all errors.
mediamosa_integrity_check_type_box in sites/all/modules/mediamosa/modules/integrity_check/mediamosa_integrity_check.module
Selectbox "typeBox".
mediamosa_maintenance_browse_errorcode_form in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_errorcode.inc
The main browse form.
mediamosa_maintenance_browse_revision_form in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_revision.inc
Show listing of the revisions (of our nodes).
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_load in includes/menu.inc
Get a menu link by its mlid, access checked and link translated for rendering.
menu_link_save in includes/menu.inc
Save a menu link.
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_set_active_trail in includes/menu.inc
Sets or gets the active trail (path to root menu root) of the current page.
menu_tree_all_data in includes/menu.inc
Get the data structure representing a named menu tree.
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.
node_access in modules/node/node.module
Determine whether the current user may perform the given operation on the specified node.
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
Determine 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
A generic function for generating RSS feeds from a set of nodes.
node_get_recent in modules/node/node.module
Find the most recent 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_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().
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.
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.
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.
taxonomy_autocomplete in modules/taxonomy/taxonomy.pages.inc
Helper function for autocompletion
taxonomy_get_children in modules/taxonomy/taxonomy.module
Find all children of a term ID.
taxonomy_get_parents in modules/taxonomy/taxonomy.module
Find 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.
trigger_menu in modules/trigger/trigger.module
Implements hook_menu().
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.
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_role_load in modules/user/user.module
Fetch a user role from database.
user_search_execute in modules/user/user.module
Implements hook_search_execute().
_block_load_blocks in modules/block/block.module
Load blocks information from the database.
_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
_mediamosa_app_contacts in sites/all/modules/mediamosa/modules/app/mediamosa_app.module
Show more specific information about a application.
_mediamosa_app_list in sites/all/modules/mediamosa/modules/app/mediamosa_app.module
Show a listing of apps.
_mediamosa_maintenance_browse_log in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_log.inc
Show a selection of the watchdog in our own log viewer.
_mediamosa_maintenance_view_revision in sites/all/modules/mediamosa/maintenance/browse/mediamosa_maintenance_browse_revision.inc
Show details of a revision.
_mediamosa_migration_create_server_nodes in sites/all/modules/mediamosa_migration/mediamosa_migration.inc
Migrate server table to nodes mediamosa_server.
_mediamosa_migration_transcode in sites/all/modules/mediamosa_migration/mediamosa_migration.inc
Migrate transcode_* tables.
_mediamosa_node_revision_access_globalconfig in sites/all/modules/mediamosa/core/node/mediamosa_node.inc
Access check for revisions on global config.
_mediamosa_node_revision_overview_globalconfig in sites/all/modules/mediamosa/core/node/mediamosa_node.inc
_mediamosa_server_list in sites/all/modules/mediamosa/modules/server/mediamosa_server.module
Show the mediamosa servers.
_mediamosa_transcode_profile_list in sites/all/modules/mediamosa/modules/transcode/profile/mediamosa_transcode_profile.inc
Show the listing of the current transcode profiles.
_mediamosa_webservice_list in sites/all/modules/mediamosa/modules/webservice/mediamosa_webservice.module
List of all webservices.
_menu_find_router_path in includes/menu.inc
Find the router path which will serve this path.
_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 a RDF mapping from the database.
_search_get_module_names in modules/search/search.admin.inc
Helper function to get real module names.
_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 2318

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