pg_fetch_array()

From: Thorsten Haude <postgresql(at)thorstenhau(dot)de>
To: PostgreSQL PHP ML <pgsql-php(at)postgresql(dot)org>
Subject: pg_fetch_array()
Date: 2002-12-18 20:38:32
Message-ID: 20021218203832.GI1604@eumel.yoo.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi,

I want to read an unknown number of rows from a select result. I try
this:
- - - Schnipp - - -
$result = pg_exec($dbh, $statement);
$row = 0;
while ($item = pg_fetch_array($result, $row, PGSQL_ASSOC))
{
doSomething($item);
$row++;
}
- - - Schnapp - - -

However, I get an error telling me that PHP is "Unable to jump to row
[$nRows + 1] on PostgreSQL result index 3 in [$file] on line [$line]

What do I miss?

tia,
Thorsten
--
Denn ein Tyrann ist nicht, wenn die Masse nicht geduldig stillhält.
- Kurt Tucholsky

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Ray Hunter 2002-12-18 20:51:17 Re: problems when i try to connect to my Databasse
Previous Message Jesus Rios 2002-12-18 19:41:25 Re: problems when i try to connect to my Databasse