Home > PHP > Function > PostgreSQL > pg_field_type_oid()

pg_field_type_oid()

pg_field_type_oid - Returns the type ID (OID) for the corresponding field number

Syntax

int pg_field_type_oid (resource $result, int $field_number)

Arguments

  • result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
  • field_number - Field number, starting from 0.

Description

pg_field_type_oid() returns an integer containing the OID of the base type of the given field_number in the given PostgreSQL result resource.

Version

PHP 5.1.0

Return value

The OID of the field's base type. FALSE is returned on error.