Re: [phplib] database problem From: Marc Fournier (marc <email protected>)
Date: 03/02/01

> > I usually call $sessdb->connect(); just before page-close() to resolve
> this
> > problem, but as written in the phplib doc, you should try to integrate the
> > session table in the same database as your application.
>
> But how about if I have to use another database but still needing to do
> session management? Is there a work around? Any hint would be appreciated.
It's explained near the end of chapter 3.1 of phplib's doc ("Additional
information about database connections").

Session managment is only one independant table, so it isn't much of a
problem to put it in the same database than your application. And if you
_have_ to use another database, simply call $sessdb->connect() (ev. with
some parameters, look at the source of db_*.inc), just before calling
page_close(). page_close() simply restores a connection to the database
defined in your extended db_sql class, or creates a new connection if none
allready exist.

Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>