|
MongoDB::createDBRef(PECL mongo >=0.9.0) MongoDB::createDBRef — Creates a database reference ОписаниеThis method is a flexible interface for creating database refrences (see MongoDBRef). Список параметров
Возвращаемые значенияReturns a database reference array. ПримерыПример #1 MongoDB::createDBRef() example Example demonstrating how to programatically create a DB reference array from a document.
<?php Результатом выполнения данного примера будет что-то подобное: Array ( [title] => Test article [description] => Test article description [_id] => MongoId Object ( ) ) Array ( [$ref] => articles [$id] => MongoId Object ( ) ) Now the $ref can be stored on another document and retrieved later with MongoDB::getDBRef() or MongoCollection::getDBRef(). Пример #2 MongoDB::createDBRef() example Example demonstrating how to programatically create a DB reference from just an id.
<?php |
|