php man page for pg_field_num

Query: pg_field_num

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PG_FIELD_NUM(3) 														   PG_FIELD_NUM(3)

pg_field_num - Returns the field number of the named field

SYNOPSIS
int pg_field_num (resource $result, string $field_name)
DESCRIPTION
pg_field_num(3) will return the number of the field number that corresponds to the $field_name in the given PostgreSQL $result resource. Note This function used to be called pg_fieldnum(3).
PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others). o $field_name - The name of the field.
RETURN VALUES
The field number (numbered from 0), or -1 on error.
EXAMPLES
Example #1 Getting information about fields <?php $dbconn = pg_connect("dbname=publisher") or die("Could not connect"); $res = pg_query($dbconn, "select author, year, title from authors where author = 'Orwell'"); echo "Column 'title' is field number: ", pg_field_num($res, 'title'); ?> The above example will output: Column 'title' is field number: 2
SEE ALSO
pg_field_name(3). PHP Documentation Group PG_FIELD_NUM(3)
Related Man Pages
pg_field_num(3) - php
pg_field_name(3) - php
pg_field_prtlen(3) - php
pg_field_type(3) - php
pg_result_error(3) - php
Similar Topics in the Unix Linux Community
How to pad spaces
help with this one please
to do with awk
duration1 and duration2 ...
Assigning Column Values to ARRAY in ksh