From: | Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz> |
---|---|
To: | Eckhard Hoeffner <e-hoeffner(at)fifoost(dot)org> |
Cc: | PHP PostgreSQL <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: using CURSOR with PHP |
Date: | 2002-05-18 10:36:02 |
Message-ID: | 3CE62E92.4000002@catalyst.net.nz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
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?
From | Date | Subject | |
---|---|---|---|
Next Message | Eckhard Hoeffner | 2002-05-18 11:03:25 | Re: using CURSOR with PHP |
Previous Message | Eckhard Hoeffner | 2002-05-18 07:26:24 | using CURSOR with PHP |