Re: using CURSOR with PHP

From: Andrew McMillan <andrew(at)catalyst(dot)net(dot)nz>
To: Jurgen Defurne <jurgen(dot)defurne(at)pandora(dot)be>
Cc: PHP PostgreSQL <pgsql-php(at)postgresql(dot)org>
Subject: Re: using CURSOR with PHP
Date: 2002-05-29 02:10:50
Message-ID: 1022638250.8777.17.camel@kant.mcmillan.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Wed, 2002-05-29 at 04:29, Jurgen Defurne wrote:
>
> However, the only thing that seems to be missing is a layer between CGI
> and the database. If someone logs in to the system, this layer should
> return a session key and provide a process which opens a connection to
> the database and keeps this open until the user logs out.
>
> This should be transparent to the application programmer. Since normally
> all traffic between PHP and postgreSQL goes via the pgsql library,
> should it not be possible to add an interface which acts as pgsql and
> handles these sessions and is able to communicate with the real pgsql
> library, which will then be part of the running program ?
>
> In this way it should then be possible to open transactions across CGI
> invocations and to work with cursors.
>
> Does anyone know if something like this exists as Free/OSS ?

PHP implements a bunch of session handling functions. If you desire you
can use the session ID from these to retrieve a record from the
database.

For myself, I have developed my own session handling, rather than use
PHP's. This was perhaps not a good choice, but it is a path I went down
some years ago now and it is hard to change :-)

PHP sessions do not require the database to be there, of course,
allowing you to stuff information into an in-memory session structure,
but this limits the amount of information that can be associated easily.

My own session management does use the database to hold session- and
user- related information, retrieving (and possibly updating) for each
page the user visits during their session.

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?

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Marco Colombo 2002-05-29 13:02:13 Re: using CURSOR with PHP
Previous Message Keary Suska 2002-05-28 19:53:09 Re: using CURSOR with PHP