nextRow
From Textbook
Contents |
Description
array nextRow ( resource $r )
Fetch the next row from a MySQL result resource.
Parameters
- r
- MySQL result resource
Return Values
Returns an associative array, or FALSE on failure.
Changelog
Examples
$result = safe_rows_start('name, RealName', 'txp_users', 1);
while ($r = nextRow($result)) {
extract($r);
$out[$name] = $RealName
}
return $out; // user full names keyed by login name
See Also
Notes
Use this function to iterate over a MySQL result resource, as returned by safe_query() or safe_rows_start(). It automatically frees the resource after the last row has been retrieved.




