Skip site navigation (1) Skip section navigation (2)

pg_pconnect+PostgreSQL cursors

From: Sergei Levchenko <serg(at)city(dot)gov(dot)te(dot)ua>
To: pgsql-php(at)postgresql(dot)org
Subject: pg_pconnect+PostgreSQL cursors
Date: 2002-12-26 16:59:14
Message-ID: 20021226165914.GA8628@city.gov.te.ua (view raw or flat)
Thread:
Lists: pgsql-php
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

Responses

pgsql-php by date

Next:From: Christopher Kings-LynneDate: 2002-12-27 03:12:20
Subject: WebDB 0.6.0 Released
Previous:From: Bruce YoungDate: 2002-12-26 15:45:03
Subject: Re: table not showing in explorer - Solved

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group