September 2001
Intermediate to advanced
768 pages
32h 45m
English
string odbc_field_name(resource result, int field)
Displays field name.
Returns:
Name of the specified field; FALSE on error
Description:
Returns the name of the field specified by a field number. Numbering starts at 1.
Version:
Existing since version 3.0.6
Example:
$db = odbc_connect("DSN","user","pass");
$sql = "SELECT * FROM Products";
$result = odbc_exec($db, $sql);
odbc_fetch_row($result);
for ($col=1; $col<=odbc_num_fields($result); $col++) {
printf("Column Name: %s\n", odbc_field_name($result, $col));
|
Read now
Unlock full access