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
activerecord:dbat [2015/12/06 17:16] – created mnewnhamv5:activerecord:dbat [2022/06/09 21:14] (current) – ↷ Links adapted because of a move operation 154.54.249.205
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 [[v5:activerecord:setdatabaseadapter|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.1449418607.txt.gz · Last modified: 2017/04/21 11:21 (external edit)