svn: /phpdoc/en/trunk/reference/mongo/mongodbref/ create.xml

From: Date: Mon, 12 Jul 2010 16:00:04 +0000
Subject: svn: /phpdoc/en/trunk/reference/mongo/mongodbref/ create.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-6887@lists.php.net to get a copy of this message
kristina Mon, 12 Jul 2010 16:00:04 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=301207 Log: fixed bug in example Changed paths: U phpdoc/en/trunk/reference/mongo/mongodbref/create.xml Modified: phpdoc/en/trunk/reference/mongo/mongodbref/create.xml =================================================================== --- phpdoc/en/trunk/reference/mongo/mongodbref/create.xml 2010-07-12 15:53:42 UTC (rev 301206) +++ phpdoc/en/trunk/reference/mongo/mongodbref/create.xml 2010-07-12 16:00:04 UTC (rev 301207) @@ -30,7 +30,7 @@ </term> <listitem> <para> - Collection name. + Collection name (without the database name). </para> </listitem> </varlistentry> @@ -69,6 +69,12 @@ &reftitle.examples; <example> <title><function>MongoDBRef::create</function> example</title> + <para> + This creates a database reference to a document in the + <literal>addresses</literal> collection. The + <function>MongoCollection::getName</function> function returns the name of + the collection (not including the database name). + </para> <programlisting role="php"> <![CDATA[ <?php @@ -79,7 +85,7 @@ $addresses->insert($address); // create a reference -$ref = MongoDBRef::create($addresses->name, $address['_id']); +$ref = MongoDBRef::create($addresses->getName(), $address['_id']); // set the field in $person $person['address'] = $ref;

« previous php.doc.cvs (#6887) next »