v5:activerecord:setdatabaseadapter
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
activerecord:setdatabaseadaptor [2015/12/06 17:21] – mnewnham | v5:activerecord:setdatabaseadaptor [2022/06/09 18:14] – setDatabaseAdaptor -> setDatabaseAdapter dregad | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
~~NOTOC~~ | ~~NOTOC~~ | ||
<WRAP right box> | <WRAP right box> | ||
== See Also == | == See Also == | ||
- | [[activerecord: | + | [[v5:activerecord: |
== Syntax == | == Syntax == | ||
bool ADODB_Active_Record:: | bool ADODB_Active_Record:: | ||
Line 11: | Line 11: | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
- | This links the Active Record class to an ADOdb database connection. The method returns true if it is a valid connection, or false if not. The optional '' | + | This links the Active Record class to an ADOdb database connection. The method returns true if it is a valid connection, or false if not. |
+ | |||
+ | The optional '' | ||
------------------------ | ------------------------ | ||
===== Usage ===== | ===== Usage ===== | ||
Line 17: | Line 19: | ||
<code php> | <code php> | ||
$db = newAdoConnection(' | $db = newAdoConnection(' | ||
- | $ADOdb_Active_Record:: | + | $db-> |
+ | $ADOdb_Active_Record:: | ||
</ | </ | ||
Example, multiple connections | Example, multiple connections | ||
Line 23: | Line 26: | ||
$db = NewADOConnection(' | $db = NewADOConnection(' | ||
$db2 = NewADOConnection(' | $db2 = NewADOConnection(' | ||
+ | |||
+ | $db-> | ||
+ | $db2-> | ||
ADOdb_Active_Record:: | ADOdb_Active_Record:: | ||
Line 40: | Line 46: | ||
* Assigns the oracle connection to this class | * Assigns the oracle connection to this class | ||
*/ | */ | ||
- | public $_dbat = 'moonnection'; | + | public $_dbat = 'oConnection'; |
} | } | ||
</ | </ |
v5/activerecord/setdatabaseadapter.txt · Last modified: 2022/06/09 18:15 by dregad