(PECL mongo >=0.9.0)

MongoDB::getDBRefFetches the document pointed to by a database reference


public MongoDB::getDBRef ( array $ref ) : array

Elenco dei parametri


A database reference.

Valori restituiti

Returns the document pointed to by the reference.


Example #1 MongoDB::getDBRef() example

Example demonstrating how to get a database reference and what the expected input is.


= array(
'$ref' => 'profiles',
'$id' => new MongoId('47cc67093475061e3d9536d2')
$profile $db->getDBRef($ref);

See MongoDB::createDBRef() for more information about how to programatically create DB references.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top