db_query_range

  1. drupal
    1. drupal6 database.mysql.inc
    2. drupal6 database.mysqli.inc
    3. drupal6 database.pgsql.inc
    4. drupal7
Versionen
drupal6 db_query_range($query)
drupal7 db_query_range($query, $args, $from = 0, $count = 0, $options = array())

Execute an arbitrary query string against the active database, restricted to a specified range.

Übergabeparameter

$query The prepared statement query to run. Although it will accept both named and unnamed placeholders, named placeholders are strongly preferred as they are more self-documenting.

$args An array of values to substitute into the query. If the query uses named placeholders, this is an associative array in any order. If the query uses unnamed placeholders (?), this is an indexed array and the order must match the order of placeholders in the query string.

$from The first record from the result set to return.

$limit The number of records to return from the result set.

$options An array of options to control how the query operates.

Rückgabewert

A prepared statement object, already executed.

See also

DatabaseConnection::defaultOptions()

Verwandte Themen

▾ 46 functions call db_query_range()

AggregatorTestCase::getDefaultFeedItemCount in modules/aggregator/aggregator.test
Return the count of the randomly created feed array.
aggregator_block_view in modules/aggregator/aggregator.module
Implementation of hook_block_view().
aggregator_feed_items_load in modules/aggregator/aggregator.pages.inc
Load feed items
aggregator_page_categories in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the categories used by the aggregator.
aggregator_page_rss in modules/aggregator/aggregator.pages.inc
Menu callback; generate an RSS 0.92 feed of aggregator items or categories.
aggregator_page_sources in modules/aggregator/aggregator.pages.inc
Menu callback; displays all the feeds used by the aggregator.
block_add_block_form_validate in modules/block/block.admin.inc
block_admin_configure_validate in modules/block/block.admin.inc
block_initialize_theme_blocks in modules/block/block.module
Assign an initial, default set of blocks for a theme.
block_system_themes_form_submit in modules/block/block.module
Initialize blocks for enabled themes.
blogapi_blogger_get_recent_posts in modules/blogapi/blogapi.module
Blogging API callback. Returns the latest few postings in a user's blog. $bodies TRUE <a href="http://movabletype.org/docs/mtmanual_programmatic.html#item_mt%2EgetRecentPostTitles"> returns a bandwidth-friendly list</a>.
book_update_6000 in modules/book/book.install
Drupal 5.x to 6.x update.
claimItem in modules/system/system.queue.inc
comment_get_recent in modules/comment/comment.module
Find the most recent comments that are available to the current user.
comment_new_page_count in modules/comment/comment.module
Calculate page number for first new comment.
DatabaseRangeQueryTestCase::testRangeQuery in modules/simpletest/tests/database_test.test
Confirm that range query work and return correct result.
do_search in modules/search/search.module
Do a query on the full-text search index for a word or words.
ForumTestCase::doAdminTests in modules/forum/forum.test
Run admin tests on the admin user.
forum_block_view in modules/forum/forum.module
Implementation of hook_block_view().
forum_get_forums in modules/forum/forum.module
Returns a list of all forums for a given taxonomy id
forum_node_presave in modules/forum/forum.module
Implementation of hook_node_presave().
hook_file_references in modules/system/system.api.php
Report the number of times a file is referenced by a module.
hook_update_index in modules/search/search.api.php
Update Drupal's full-text index for this module.
menu_edit_menu_validate in modules/menu/menu.admin.inc
Validates the human and machine-readable names when adding or editing a menu.
menu_node_prepare in modules/menu/menu.module
Implementation of hook_node_prepare().
node_assign_owner_action_validate in modules/node/node.module
node_type_save in modules/node/node.module
Saves a node type to the database.
node_update_index in modules/node/node.module
Implementation of hook_update_index().
pager_query in includes/pager.inc
Perform a paged database query.
path_admin_overview in modules/path/path.admin.inc
Return a listing of all defined URL aliases. When filter key passed, perform a standard search on the given key, and return the list of matching URL aliases.
php_install in modules/php/php.install
Implementation of hook_install().
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_category_access in modules/profile/profile.module
Menu item access callback - check if a user has access to a profile category.
system_update_6021 in modules/system/system.install
Migrate the menu items from the old menu system to the new menu_links table.
upload_file_references in modules/upload/upload.module
Implementation of hook_file_references().
user_admin_role_validate in modules/user/user.admin.inc
user_autocomplete in modules/user/user.pages.inc
Menu callback; Retrieve a JSON object containing autocomplete suggestions for existing users.
user_block_view in modules/user/user.module
Implementation of hook_block_view().
user_file_references in modules/user/user.module
Implementation of hook_file_references().
user_update_7000 in modules/user/user.install
Increase the length of the password field to accommodate better hashes.
user_update_7002 in modules/user/user.install
Convert user time zones from time zone offsets to time zone names.
user_update_7004 in modules/user/user.install
Add the user's pictures to the {files} table and make them managed files.
user_user_validate in modules/user/user.module
Implementation of hook_user_validate().
_comment_update_node_statistics in modules/comment/comment.module
Updates the comment statistics for a given node. This should be called any time a comment is added, deleted, or updated.
_node_access_rebuild_batch_operation in modules/node/node.module
Batch operation for node_access_rebuild_batch.

Code

includes/database/database.inc, line 1802

<?php
function db_query_range($query, $args, $from = 0, $count = 0, $options = array()) {
  if (!is_array($args)) {
    $args = func_get_args();
    array_shift($args);
    $count = array_pop($args);
    $from = array_pop($args);
  }
  list($query, $args, $options) = _db_query_process_args($query, $args, $options);

  return Database::getConnection($options['target'])->queryRange($query, $args, $from, $count, $options);
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen