From: Andrew McMillan <andrew@catalyst.net.nz>
To: Eckhard Hoeffner <e-hoeffner@fifoost.org>
Cc: PHP PostgreSQL <pgsql-php@postgresql.org>
Subject: Re: using CURSOR with PHP
Date: Sat, 18 May 2002 22:36:02 +1200
Message-ID: <3CE62E92.4000002@catalyst.net.nz> (raw)
References: <20020518072624.GA16938@fifoost.org>
Eckhard Hoeffner wrote:
> Does anyone has a solution to use the CURSOR function with PHP. The
> main problem - in my opinion - is, that the CURSOR must be closed
> and if the database is accessed from a web browser, this can not be
> ensured.
>
I don't use cursors in web applications myself, since PostgreSQL
supports the excellent "SELECT ... LIMIT <n> OFFSET <m>" syntax in all
of the cases where I might otherwise have done so.
That's my experience to date, anyway - I'm prepared to find somewhere a
cursor might be a requirement - I know that if you wanted to write
cross-database portable code you would probably need to work with them.
Regardless, unless you open your database connection as a persistent
connection, the database connection will be closed when the script
finishes, and that should clean up all that is necessary.
Regards,
Andrew.
--
--------------------------------------------------------------------
Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
Are you enrolled at http://schoolreunions.co.nz/ yet?
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: andrew@catalyst.net.nz, e-hoeffner@fifoost.org
Subject: Re: using CURSOR with PHP
In-Reply-To: <3CE62E92.4000002@catalyst.net.nz>
References: <20020518072624.GA16938@fifoost.org> <3CE62E92.4000002@catalyst.net.nz>
* 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