ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:activerecord:dbat

Differences

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

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
v5:activerecord:dbat [2015/12/06 17:16]
mnewnham created
v5:activerecord:dbat [2016/01/13 02:15]
mnewnham ↷ Page moved from activerecord:dbat to v5:activerecord:dbat
Line 6: Line 6:
 </​WRAP>​ </​WRAP>​
 ===== Description ===== ===== Description =====
-Setting the value of this class variable forces the class to use the specified database connection for a class. Form more information on this, see [[activerecord:​setdatabaseconnection:​ADOdb_Active_Record::​setDatabaseConnection()]]. +Setting the value of this class variable forces the class to use the specified database connection for a class. Form more information on this, see [[activerecord:​setdatabaseadaptor|ADOdb_Active_Record::​setDatabaseAdaptor()]]. There is normally no need to use this unless multiple database connections have been configured.
 ===== Usage ===== ===== Usage =====
-In the example below, an Active Record class called ''​person''​ is not associated with a table called ''​persons''​ (the default), but with a table called ''​people''​.+In the example below, an Active Record class called ''​person''​ is associated with a database adaptor ​called ''​oracleAdaptor''​.
  
 <code php> <code php>
 class person extends ADOdb_Active_Record class person extends ADOdb_Active_Record
 { {
-   ​public $_table ​= 'people';+   ​public $_dbat = 'oracleAdaptor';
 } }
 </​code>​ </​code>​
v5/activerecord/dbat.txt · Last modified: 2016/01/13 02:15 by mnewnham