ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:session:reference:adodb_sess_conn

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

v5:session:reference:adodb_sess_conn [2016/05/22 16:55] (current)
mnewnham created
Line 1: Line 1:
 +====== $ADODB_SESS_CONN ======
 +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.
 +===== Usage =====
 +<code php>
  
 +include_once 'adodb/adodb.inc.php';
 +include_once "adodb/session/adodb-session2.php";
 +
 +$driver = 'mysqli';
 +$host = '127.0.0.1';
 +$user = 'user';
 +$pass = 'pass';
 +$database = 'adodb-sess';
 +
 +ADODB_session::config($driver,$host,$user,$pass,$database);
 +
 +session_start();
 +
 +$_SESSION['page'] = 'page1';
 +
 +/*
 +* Who else is connected?
 +*/
 +$SQL = "SELECT * FROM session2";
 +$result = $ADODB_SESS_CONN->execute($SQL);
 +/*
 +* etc etc etc......
 +*/
 +</code>
v5/session/reference/adodb_sess_conn.txt ยท Last modified: 2016/05/22 16:55 by mnewnham