Same name in this branch
  1. 6.x includes/database.pgsql.inc \db_fetch_object()
  2. 6.x includes/database.mysqli.inc \db_fetch_object()
  3. 6.x includes/database.mysql.inc \db_fetch_object()
Same name and namespace in other branches
  1. 4.6.x includes/database.pgsql.inc \db_fetch_object()
  2. 4.6.x includes/database.mysql.inc \db_fetch_object()
  3. 4.7.x includes/database.pgsql.inc \db_fetch_object()
  4. 4.7.x includes/database.mysqli.inc \db_fetch_object()
  5. 4.7.x includes/database.mysql.inc \db_fetch_object()
  6. 5.x includes/database.pgsql.inc \db_fetch_object()
  7. 5.x includes/database.mysqli.inc \db_fetch_object()
  8. 5.x includes/database.mysql.inc \db_fetch_object()

Fetch one result row from the previous query as an object.

Parameters

$result: A database query result resource, as returned from db_query().

Return value

An object representing the next row of the result, or FALSE. The attributes of this object are the table fields selected by the query.

Related topics

44 calls to db_fetch_object()
actions_load in includes/actions.inc
Retrieve a single action from the database.
aggregator_form_category_validate in modules/aggregator/aggregator.admin.inc
Validate aggregator_form_feed form submissions.
aggregator_page_rss in modules/aggregator/aggregator.pages.inc
Menu callback; generate an RSS 0.92 feed of aggregator items or categories.
aggregator_parse_feed in modules/aggregator/aggregator.module
Parse a feed and store its items.
cache_get in includes/cache.inc
Return data from the persistent cache. Data may be stored as either plain text or as serialized data. cache_get will automatically return unserialized objects and arrays.

... See full list

File

includes/database.mysql.inc, line 149
Database interface code for MySQL database servers.

Code

function db_fetch_object($result) {
  if ($result) {
    return mysql_fetch_object($result);
  }
}