->database() – Get or set the database the object uses


object $DB_DataObject->database ( string $name )


Without any argument, it returns the database that the object deals with. With a string, it will set the database for the instance of the object.


This function can not be called statically.


Getting the database name

= new DataObjects_Person;
// echo's mydatabase

// now use the same object to check on a mirror..

$person->id 12;
Get or set the table name of an object (Previous) Get or set the table schema (Next)
Last updated: Fri, 27 Nov 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.