v5:session:reference:adodb_sess_conn
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
v5:session:reference:adodb_sess_conn [2016/05/22 16:55] – created mnewnham | v5:session:reference:adodb_sess_conn [2021/01/23 22:53] (current) – [$ADODB_SESS_CONN] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== $ADODB_SESS_CONN ====== | ====== $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, | 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, | ||
+ | |||
+ | 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. | ||
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> | ||
Line 27: | Line 29: | ||
* etc etc etc...... | * etc etc etc...... | ||
*/ | */ | ||
+ | </ | ||
+ | |||
+ | ===== Using An Existing Connection ===== | ||
+ | <code php> | ||
+ | |||
+ | $dbtype=" | ||
+ | $dbhost=" | ||
+ | $dbusername=" | ||
+ | $dbpassword=" | ||
+ | $dbname=" | ||
+ | |||
+ | $dbconn=NewADOConnection($dbtype); | ||
+ | $dbconn-> | ||
+ | $dbconn-> | ||
+ | $dbconn-> | ||
+ | |||
+ | $GLOBALS[' | ||
+ | |||
+ | ADOdb_Session:: | ||
+ | session_start(); | ||
</ | </ |
v5/session/reference/adodb_sess_conn.1463928922.txt.gz · Last modified: 2017/04/21 11:38 (external edit)