pg_field_num()
pg_field_num - Returns the field number of the named field
Syntax
int pg_field_num (
resource $result,
string $field_name)
Arguments
- result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
- field_name - The name of the field.
Description
pg_field_num() will return the number of the field number that corresponds to the field_name in the given PostgreSQL result resource.
Version
PHP 4.2.0, 5
Return value
The field number (numbered from 0), or -1 on error.