Database Abstraction Layer for PHP

User Tools

Site Tools



This variable holds an instance of the database connection and can be used as required. The connection is itself an instance of a standard ADOdb connections, and all available functionality may be used.

The feature is also useful if you want session manager to use a connection that relies on complex connection parameters, such a MySQL SSL certificates (see the second example) which cannot be achieved using the normal session connection. This is done by telling the session manager to use an already instantiated connection.


include_once 'adodb/';
include_once "adodb/session/adodb-session2.php";
$driver = 'mysqli';
$host = '';
$user = 'user';
$pass = 'pass';
$database = 'adodb-sess';
$_SESSION['page'] = 'page1';
* Who else is connected?
$SQL = "SELECT * FROM session2";
$result = $ADODB_SESS_CONN->execute($SQL);
* etc etc etc......

Using An Existing Connection

ADOdb_Session::config($dbtype, $dbhost, $dbusername, $dbpassword, $dbname, $options=false);
v5/session/reference/adodb_sess_conn.txt · Last modified: 2021/01/23 22:53 by mnewnham