int pg_num_fields ( resource $result )
pg_num_fields() returns the number of fields (columns) in a PostgreSQL result resource. Note: This function used to be called pg_numfields().
The number of fields (columns) in the result. On error, -1 is returned.