object sqlanywhere_fetch_field( resource result_identifier [, field_offset ] )
This function is deprecated. You should use the following PHP function instead: sasql_fetch_field.
Returns an object that contains information about a specific column.
result_identifier The result resource returned by the sqlanywhere_query function.
field_offset An integer representing the column/field on which you want to retrieve information. Columns are zero based; to get the first column, specify the value 0. If this parameter is omitted, then the next field object is returned.
An object that has the following properties:
ID contains the field/column number
name contains the field/column name
numeric indicates whether or not the field is a numeric value
length returns field length
type returns field type
This example shows how to use sqlanywhere_fetch_field to retrieve all the column information for a result set.
$result = sqlanywhere_query($conn, "SELECT GivenName, Surname FROM Employees"); while( ($field = sqlanywhere_fetch_field( $result )) ) { echo " Field ID = $field->id \n"; echo " Field name = $field->name \n"; } |
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |