Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

dbresult

Retrieves the contents of one cell from a MySQL result set.

When working on large result sets, you should consider using one of the functions that fetch an entire row (specified below).
As these functions return the contents of multiple cells in one function call, they are much faster than dbresult().
Also, note that specifying a numeric offset for the field argument is much quicker than specifying a fieldname or a tablename.fieldname argument.

dbresult

Quote

dbresult ( resource $query, string $row )


Parameters
query
The query resource that is being evaluated. This result comes from a call to dbquery().

row
The row number from the result that's being retrieved. Row numbers start at 0.

Return Values
The contents of one cell from a MySQL result set on success, or FALSE on failure.

Example
Code
<?php
$result = dbquery("SELECT user_name FROM ".DB_USERS." WHERE user_level='102'");
if ($result) {
 echo dbresult($result, 1); // outputs second admin's name
}
?>

Will output the second admin's name from the user database.

Changelog
7.01.00 - Added query count

Notes
Calls to dbresult() should not be mixed with calls to other functions that deal with the result set.