Home > PHP > Function > PostgreSQL > pg_field_is_null()

pg_field_is_null()

pg_field_is_null - Test if a field is SQL
NULL

Syntax

int pg_field_is_null (resource $result, int $row, mixed $field, resource $result, mixed $field, resource $result, int $row, mixed $field, resource $result, mixed $field)

Arguments

  • result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
  • row - Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, current row is fetched.
  • field - Field number (starting from 0) as an integer or the field name as a string.
  • result
  • field
  • result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
  • row - Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, current row is fetched.
  • field - Field number (starting from 0) as an integer or the field name as a string.
  • result
  • field

Description

pg_field_is_null() tests if a field in a PostgreSQL result resource is SQL NULLor not.

Version

PHP 4.2.0, 5

Return value

Returns 1if the field in the given row is SQL NULL, 0if not. FALSE is returned if the row is out of range, or upon any other error.