From: Sergei Levchenko <serg@city.gov.te.ua>
To: pgsql-php@postgresql.org
Subject: pg_pconnect+PostgreSQL cursors
Date: Thu, 26 Dec 2002 18:59:14 +0200
Message-ID: <20021226165914.GA8628@city.gov.te.ua> (raw)
Hi all
<?
$connection = pg_pconnect("dbname=$db user=$user password=$password");
if (!isset($page))
{
pg_exec($connection, "BEGIN WORK");
pg_exec($connection, "DECLARE all_data CURSOR FOR SELECT id,body FROM test")
}
$result = pg_exec($connection, "FETCH 1 FROM all_data");
$info = pg_fetch_array($result, 0);
print "|$info[0]|$info[1]|<br>\n";
?>
When I execute this script at first without page parameter I'v got data to info array! when I execute it at other times I'v got nothing :(
I've got closing of cursor and transaction! why??? I use permanent connection, why I've got closing of cursor and transaction!???
--
WBR, sector119
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: serg@city.gov.te.ua
Subject: Re: pg_pconnect+PostgreSQL cursors
In-Reply-To: <20021226165914.GA8628@city.gov.te.ua>
References: <20021226165914.GA8628@city.gov.te.ua>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox