php man page for pg_num_fields

Query: pg_num_fields

OS: php

Section: 3

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

PG_NUM_FIELDS(3)														  PG_NUM_FIELDS(3)

pg_num_fields - Returns the number of fields in a result

SYNOPSIS
int pg_num_fields (resource $result)
DESCRIPTION
pg_num_fields(3) returns the number of fields (columns) in a PostgreSQL result resource. Note This function used to be called pg_numfields(3).
PARAMETERS
o $result - PostgreSQL query result resource, returned by pg_query(3), pg_query_params(3) or pg_execute(3) (among others).
RETURN VALUES
The number of fields (columns) in the result. On error, -1 is returned.
EXAMPLES
Example #1 pg_num_fields(3) example <?php $result = pg_query($conn, "SELECT 1, 2"); $num = pg_num_fields($result); echo $num . " field(s) returned. "; ?> The above example will output: 2 field(s) returned.
SEE ALSO
pg_num_rows(3), pg_affected_rows(3). PHP Documentation Group PG_NUM_FIELDS(3)
Related Man Pages
pg_fetch_result(3) - php
pg_fetch_all(3) - php
pg_fetch_row(3) - php
pg_field_name(3) - php
pg_field_type(3) - php
Similar Topics in the Unix Linux Community
meaning of columns in the result of executing 'ls -l'
Deduplicate fields
Cut file using regular expressions
what is the result of this?
Compare fields within a file