Return an individual result field from the previous query.
Only use this function if exactly one field is being selected; otherwise,
use db_fetch_object() or db_fetch_array().
Parameters
$result:
A database query result resource, as returned from db_query().
$row:
The index of the row whose result is needed.
Return value
The resulting field.
Related topics
- Database abstraction layer
- Allow the use of different database servers using the same code base.
- aggregator_block in modules/aggregator.module
- Implementation of hook_block().
- comment_multiple_delete_confirm in modules/comment.module
- List the selected comments and verify that the admin really wants to delete
them.
- comment_nodeapi in modules/comment.module
- Implementation of hook_nodeapi().
- comment_num_all in modules/comment.module
- comment_num_new in modules/comment.module
- get number of new comments for current user and specified node
- comment_num_replies in modules/comment.module
- comment_save in modules/comment.module
- Accepts a submission of new or changed comment content.
- comment_validate in modules/comment.module
- db_check_setup in includes/database.pgsql.inc
- Verify if the database is set up correctly.
- db_next_id in includes/database.mysqli.inc
- Return a new unique ID in the given sequence.
- db_next_id in includes/database.pgsql.inc
- Return a new unique ID in the given sequence.
- db_next_id in includes/database.mysql.inc
- Return a new unique ID in the given sequence.
- do_search in modules/search.module
- Do a query on the full-text search index for a word or words.
- drupal_get_filename in includes/bootstrap.inc
- Returns and optionally sets the filename for a system item (module,
theme, etc.). The filename, whether provided, cached, or retrieved
from the database, is only returned if the file exists.
- drupal_lookup_path in includes/path.inc
- Given an alias, return its Drupal system URL if one exists. Given a Drupal
system URL return its alias if one exists.
- fileupload_file_download in developer/examples/fileupload.module
- Implementation of hook_file_download.
- fileupload_update in developer/examples/fileupload.module
- Implementation of hook_update().
- filter_format_allowcache in modules/filter.module
- Check if text in a certain input format is allowed to be cached.
- forum_submit in modules/forum.module
- Implementation of hook_submit().
- forum_validate in modules/forum.module
- Implementation of hook_validate().
- hook_file_download in developer/hooks/core.php
- Allow file downloads.
- locale_admin_string_delete in modules/locale.module
- Delete a string.
- menu_reset_item in modules/menu.module
- Menu callback; reset a single modified item.
- multipage_form_example_custom_submit in developer/examples/multipage_form_example.module
- node_access in modules/node.module
- Determine whether the current user may perform the given operation on the
specified node.
- node_access_view_all_nodes in modules/node.module
- Determine whether the user has a global viewing grant for all nodes.
- node_comment_mode in modules/node.module
- Retrieve the comment mode for the given node ID (none, read, or read/write).
- node_menu in modules/node.module
- Implementation of hook_menu().
- node_multiple_delete_confirm in modules/node.module
- node_page in modules/node.module
- Menu callback; dispatches control to the appropriate operation handler.
- node_revision_delete in modules/node.module
- Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a
revision is deleted.
- node_revision_delete_confirm_submit in modules/node.module
- node_search in modules/node.module
- Implementation of hook_search().
- node_update_index in modules/node.module
- Implementation of hook_update_index().
- pager_query in includes/pager.inc
- Perform a paged database query.
- path_form_alter in modules/path.module
- Implementation of hook_form_alter().
- path_form_validate in modules/path.module
- Verify that URL alias is valid.
- path_nodeapi in modules/path.module
- Implementation of hook_nodeapi().
- path_set_alias in modules/path.module
- Set an aliased path for a given Drupal path, preventing duplicates.
- poll_block in modules/poll.module
- Implementation of hook_block().
- profile_field_form_validate in modules/profile.module
- Validate profile_field_form submissions.
- search_update_totals in modules/search.module
- This function is called on shutdown to ensure that search_total is always
up to date (even if cron times out or otherwise fails).
- system_update_124 in database/updates.inc
- system_update_169 in database/updates.inc
- system_update_172 in database/updates.inc
- system_update_178 in database/updates.inc
- Update base paths for relative URLs in node and comment content.
- system_update_179 in database/updates.inc
- Update base paths for relative URLs in custom blocks, profiles and various variables.
- throttle_exit in modules/throttle.module
- Implementation of hook_exit().
- upload_delete_revision in modules/upload.module
- upload_save in modules/upload.module
- upload_space_used in modules/upload.module
- Determine how much disk space is occupied by a user's uploaded files.
- upload_total_space_used in modules/upload.module
- Determine how much disk space is occupied by uploaded files.
- user_admin_edit_role_validate in modules/user.module
- user_admin_new_role_validate in modules/user.module
- user_save in modules/user.module
- Save changes to a user account or add a new user.
- _comment_update_node_statistics in modules/comment.module
- Updates the comment statistics for a given node. This should be called any
time a comment is added, deleted, or updated.
- _forum_get_vid in modules/forum.module
- Returns the vocabulary id for forum navigation.
- _forum_new in modules/forum.module
- Finds the first unread node for a given forum.
- _forum_topics_unread in modules/forum.module
- Calculate the number of nodes the user has not yet read and are newer
than NODE_NEW_LIMIT.
- _update_178_url_formats in database/updates.inc
File
- includes/database.pgsql.inc, line 175
- Database interface code for PostgreSQL database servers.
Code
<?php
function db_result($result, $row = 0) {
if ($result && pg_num_rows($result) > $row) {
$res = pg_fetch_row($result, $row);
return $res[0];
}
}
?>
Login or
register to post comments