pg_field_name

PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
pg_field_name - Returns the name of a field
Manual
Code Examples

pg_field_name( PgSql\Result$result, int$field ): string

pg_field_name returns the name of the field occupying the given field in the given result instance. Field numbering starts from 0.

Note:

This function used to be called pg_fieldname.

Parameters

result

An PgSql\Result instance, returned by pg_query, pg_query_params or pg_execute(among others).

field

Field number, starting from 0.

Return Values

The field name.

Changelog

Version Description
8.1.0 The result parameter expects an PgSql\Result instance now; previously, a resource was expected.

Related Functions

Example of pg_field_name

Show all examples for pg_field_name

PHP Version:


Function pg_field_name:

PostgreSQL Functions

Most used PHP functions