downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoDBRef::isRef> <MongoDBRef::create
[edit] Last updated: Fri, 25 May 2012

view this page in

MongoDBRef::get

(PECL mongo >= 0.9.0)

MongoDBRef::get参照が指すオブジェクトを取得する

説明

public static array MongoDBRef::get ( MongoDB $db , array $ref )

パラメータ

db

使用するデータベース。

ref

取得したい参照。

返り値

参照が指すドキュメントを返します。ドキュメントが存在しない (参照が壊れている) 場合は NULL を返します。

例1 MongoCollection::createDBRef() の例

<?php

// $person を db から取得します
$person $people->findOne();

// 住所を取得します
$address MongoDBRef::get($people->db$person['address']);

?>

参考



add a note add a note User Contributed Notes MongoDBRef::get
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites