Podręcznik PHP
Poprzedni |  | Następny

# mysqli_fetch_field

(PHP 5 CVS only)

mysqli_fetch_field

(no version information, might be only in CVS)

result->fetch_field -- Returns the next field in the result set

## Description

Procedural style:

mixed mysqli_fetch_field ( object result)

Object oriented style (method):

class result {
mixed fetch_field ( void )
}

The mysqli_fetch_field() function is used to return the attributes of the next column in the result set represented by the `result` parameter as an object. When executed this function will return an object containing the attributes of the current column or `FALSE` if there are no more columns in the result set.

Tabela 1. Object attributes

Attribute | Description
--- | ---
name | The name of the column
orgname | Original column name if an alias was specified
table | The name of the table this field belongs to (if not calculated)
orgtable | Original table name if an alias was specified
def | The default value for this field, represented as a string
max_length | The maximum width of the field for the result set.
flags | An integer representing the bit-flags for the field.
type | The data type used for this field
decimals | The number of decimals used (for integer fields)

## Return values

Returns an object which contains field definition informations or `FALSE` if no field information is available.

## See also

mysqli_num_fields() mysqli_fetch_field_direct() mysqli_fetch_fields()

Poprzedni | Spis treści | Następny
mysqli_fetch_field_direct | Początek rozdziału | mysqli_fetch_fields