previous->tableName() (Previous) (Next) ->table()next

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

->database()

->database() – オブジェクトが使用するデータベースを取得、あるいは設定する

Synopsis

object $DB_DataObject->database ( string $name )

Description

引数なしの場合、オブジェクトが扱うデータベースを返します。 文字列を渡した場合、そのオブジェクトが扱うデータベースをセットします。

Note

This function can not be called statically.

Example

データベース名の取得

<?php
$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);
?>
previous->tableName() (Previous) (Next) ->table()next

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.