diff --git a/reference/mongo/mongodb/command.xml b/reference/mongo/mongodb/command.xml index dcbbe65db1..3f8bfe1038 100644 --- a/reference/mongo/mongodb/command.xml +++ b/reference/mongo/mongodb/command.xml @@ -18,12 +18,14 @@ There's a command for that. Need to turn up logging? You get the idea. - This method is identical to running: + This method is identical to the function: selectCollection('$cmd')->findOne($data); +public function command($data) { + return $this->selectCollection('$cmd')->findOne($data); +} ?> ]]> diff --git a/reference/mongo/mongodb/construct.xml b/reference/mongo/mongodb/construct.xml index dc9c49bed1..7c9aac0676 100644 --- a/reference/mongo/mongodb/construct.xml +++ b/reference/mongo/mongodb/construct.xml @@ -14,6 +14,42 @@ Mongoconn stringname + + This method is not meant to be called directly. The preferred way to create + an instance of MongoDB is through Mongo::__get or + Mongo::selectDB. + + + If you're ignoring the previous paragraph and want to call it directly you + can do so: + + + +]]> + + + But don't. Isn't this much nicer: + + +mydbname; + +// or, if the name contains weird characters: + +$db = $m->selectDB('my,db:name'); + +?> +]]> +