sasql_fetch_field

Prototype
object sasql_fetch_field(  sasql_result $result [, int $field_offset ] )
Description

Returns an object that contains information about a specific column.

Parameters

$result   The result resource returned by the sasql_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.

Returns

An object that has the following properties:

  • ID   contains the field's number

  • name   contains the field's name

  • numeric   indicates whether or not the field is a numeric value

  • length   returns the field's native storage size.

  • type   returns the field's type

  • native_type   returns the field's native type. These are values like DT_FIXCHAR, DT_DECIMAL or DT_DATE. See Embedded SQL data types.

  • precision   returns the field's numeric precision. This property is only set for fields with native_type equal to DT_DECIMAL.

  • scale   returns the field's numeric scale. This property is only set for fields with native_type equal to DT_DECIMAL.

Related functions