->database() -- Get or set the database the object uses
Описание
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.
Заметка
Эта функция не должна вызываться статически.
Пример
Пример 35-1. Getting the database name
$person = new DataObjects_Person;
echo $person->database();
// echo's mydatabase
// now use the same object to check on a mirror..
$person->database('mirror1');
$person->id = 12;
$person->find(true); |
|