svn: /phpdoc/en/trunk/reference/mongo/mongoclient/ construct.xml
| From: | Hannes Magnusson | Date: | Thu, 07 Mar 2013 21:21:24 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/mongo/mongoclient/ construct.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-11083@lists.php.net to get a copy of this message | ||
bjori Thu, 07 Mar 2013 21:21:24 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=329698
Log:
Make more sense for this example, one node seedlist is a bad idea
Changed paths:
U phpdoc/en/trunk/reference/mongo/mongoclient/construct.xml
Modified: phpdoc/en/trunk/reference/mongo/mongoclient/construct.xml
===================================================================
--- phpdoc/en/trunk/reference/mongo/mongoclient/construct.xml 2013-03-07 20:59:24 UTC (rev 329697)
+++ phpdoc/en/trunk/reference/mongo/mongoclient/construct.xml 2013-03-07 21:21:24 UTC (rev 329698)
@@ -416,12 +416,10 @@
<?php
// pass a comma-separated list of server names to the constructor
+// Note that we don't need to pass in all the members of the replicaset, the driver
+// will derive the full list.
$m1 = new MongoClient("mongodb://sf2.example.com,ny1.example.com",
array("replicaSet" => "myReplSet"));
-// you only need to pass a single seed, the driver will derive the full list and
-// find the primary from this seed
-$m2 = new MongoClient("mongodb://ny1.example.com", array("replicaSet" =>
"myReplSet"));
-
?>
]]>
</programlisting>