Gets one field of the result.
|
mixed i5_result ( |
resource result, int/string field ) |
i5_result returns a cell content. Argument may be field index or its name.
Opposite to fetch functions that fetch the full line, i5_result returns a current line cell value for the specified name or position field.
The field value is read from the current record fetched by a previous call to i5_fetch_xxx function.
|
result |
Resource describing file or other record set.
|
|
field |
Integer or string identifying the field position or name.
|
Returns:
Field's contents in current record.
|
I5_ERR_PHP_HDLDFT |
256 |
No default connection found. |
|
I5_ERR_PHP_OPTIONSTYPE |
259 |
The type of " I5_OPTIONS_ALIAS" option must be x and not x |
|
I5_ERR_PHP_OPTIONSNUMBER |
260 |
Option number -1 is unknown. |
|
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
$file = i5_open("EASYCOM/CLIENTS");
/* Searches for the first wholesaler name beginning with DU */
$seek = array("FAMILY" => "WHOLESALERS", "NAME" => "DU");
$ret = i5_seek($file, ">=", $seek);
/* Fetches all values */
$rec == i5_fetch_row($file, I5_READ_SEEK)
/* Fetches a single field */
$ca = i5_result($file, "CA");
i5_fetch_row