Hostign Towebs
 
    BUSCARDOR 
 
pg_fetch_all

pg_fetch_all

(PHP 4 >= 4.3.0, PHP 5)

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

Descripción

array pg_fetch_all ( resource result )

pg_fetch_all() returns an array that contains all rows (records) in the result resource.

Nota: Esta funcion define campos NULL como valores PHP NULL.

Lista de parámetros

result

PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).

Valores retornados

An array with all rows in the result. Each row is an array of field values indexed by field name.

FALSE is returned if there are no rows in the result, or on any other error.

Ejemplos

Ejemplo 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);

?>



 
 
Rute path: HOME / MANUALES Y TUTORIALES / MANUAL DE PHP
Home | Hosting | Housing | Revendedores | Soporte | Empresa | Mapa del Sitio | Contacto | FAQ | Blog Corporativo
Atención técnica y comercial: (54)-11-5031-1111 las 24 hs. los 365 días del año. ToWebs, (c) 2008
Virtucom Networks S.A Av. Belgrano 1586, piso 10 (C1093AAQ) Cap. Fed. Bs. As, Argentina.