Re: using CURSOR with PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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?



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux