ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:session:reference:persist

Differences

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

Link to this comparison view

Next revision
Previous revision
v5:session:reference:persist [2016/05/22 00:21] – created mnewnhamv5:session:reference:persist [2018/07/01 22:55] (current) – prefer functions start lowercase (#430) peterdd
Line 1: Line 1:
-====== ADOdb_Session::persit======+====== ADOdb_Session::persist======
 ~~NOTOC~~ ~~NOTOC~~
 <WRAP right box> <WRAP right box>
 ==Syntax== ==Syntax==
-  bool ADOdb_Session::persist( +  mixed ADOdb_Session::persist( 
-    optional bool $persistantConnection+    optional mixed $connectMode
     )     )
 </WRAP> </WRAP>
 ===== Description ======= ===== Description =======
-The **static** method //**persists**// sets or gets the status of a persistent connection on the session connection. This is not the same value as the driver associated with the database abstraction layer.+The **static** method //**persist**// sets or gets the status of a persistent connection on the session connection. This is not the same value as the driver associated with the database abstraction layer.
  
-The value must be set **//before//** [[v5:session:reference:config|config()]] is called+The value must be set **//before//** [[v5:session:reference:config|config()]] is called
 + 
 + 
 +The parameter to the ''persist()'' method sets the connection mode. You can pass the following: 
 + 
 +^$connectMode^Connection Method^ 
 +^true|pConnect()| 
 +^false|connect()| 
 +^'N'|nConnect()| 
 +^'P'|pConnect()| 
 +^'C'|connect()|
    
 =====Use As A Getter===== =====Use As A Getter=====
Line 21: Line 31:
 include_once "adodb/session/adodb-session2.php"; include_once "adodb/session/adodb-session2.php";
  
-ADOdb_session::driver('oci8'); +ADOdb_Session::driver('oci8'); 
-ADOdb_session::persist(true); +ADOdb_Session::persist(true); 
-ADOdb_session::config('',$host,$user,$pass,$database);+ADOdb_Session::config('',$host,$user,$pass,$database);
  
 </code> </code>
v5/session/reference/persist.1463869312.txt.gz · Last modified: 2017/04/21 11:38 (external edit)