PHP Handbuch
Zurück |  | Weiter

# pg_fetch_all

(PHP 4 >= 4.3.0, PHP 5)

pg_fetch_all -- Fetches all rows from a result as an array

## Beschreibung

array pg_fetch_all ( resource result )

pg_fetch_all() returns an array that contains all rows (tuples/records) in result resource. It returns `FALSE`, if there are no rows.

> Anmerkung: Diese Funktion setzt NULL Felder auf den PHP Wert `NULL`.

## Beispiele

Beispiel 1. PostgreSQL fetch all
`<?php $conn = pg_pconnect("dbname=publisher"); if (!$conn) { echo "An error occured.\n"; exit; } $result = pg_query($conn, "SELECT * FROM authors"); if (!$result) { echo "An error occured.\n"; exit; } $arr = pg_fetch_all($result); var_dump($arr); ?>`

## Siehe auch

pg_fetch_row()
pg_fetch_array()
pg_fetch_object()
pg_fetch_result()

Zurück | Zum Anfang | Weiter
pg_execute | Nach oben | pg_fetch_array