Re: Cursors and PHP

From: Steve Manes <smanes(at)magpie(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cursors and PHP
Date: 2004-04-17 17:36:39
Message-ID: 40816B27.80904@magpie.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

> Steve Manes <smanes(at)magpie(dot)com> writes:
>
>> $query = "SELECT get_user_data('$cursor', $user_id);FETCH ALL IN
>>$cursor;";
>
>
>> $res =& $dbh->query($query);
>
>
> Hm. This will return two different, not-compatible result sets (the
> SELECT's output and then the FETCH's).

Without the FETCH in that compound PHP query however, nothing gets
returned from the SELECT. I'm not sure why but maybe it's because
PEAR::DB doesn't have any direct support for cursors so it's just
grabbing a result set.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pascal Polleunus 2004-04-17 18:13:04 Re: ERROR: NEW used in non-rule query (was Parse error
Previous Message Bruno BAGUETTE 2004-04-17 17:26:35 ERROR: NEW used in non-rule query (was Parse error a in short stored procedure : What's wrong ?)