Get field name.
string i5_field_name ( |
resource result/file, |
i5_field_name function give the x file or request field name.
result |
Resource describing file or other record set
|
filed |
Integer identifying the field position.
|
Returns:
Field's length.
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. |
$result = i5_query("SELECT * FROM LATABLE");
$fields = i5_num_fields($result);
$lines = i5_num_rows($result);
echo "The table contains " . $fields . " columns and " . $lines . " line(s)\n";
echo "Columns are as follow:\n";
for ($i=0; $i < $fields; $i++) {
$type = i5_field_type($result, $i);
$name = i5_field_name($result, $i);
$len = i5_field_len($result, $i);
echo $type . " " . $name . " " . $len. "\n";
}