downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Mongo::selectDB> <Mongo::poolDebug
[edit] Last updated: Fri, 25 May 2012

view this page in

Mongo::selectCollection

(PECL mongo >=0.9.0)

Mongo::selectCollectionデータベースコレクションを取得する

説明

public MongoCollection Mongo::selectCollection ( string $db , string $collection )

パラメータ

db

データベース名。

collection

コレクション名。

返り値

新しいコレクションオブジェクトを返します。

エラー / 例外

データベース名あるいはコレクション名が不正な場合に InvalidArgumentException をスローします。

例1 Mongo::selectCollection() の例

<?php
$m 
= new Mongo();

$c1 $m->selectCollection("foo""bar.baz");
// これは、以下と同等です
$c2 $m->selectDB("foo")->selectCollection("bar.baz");

// $c1 と $c2 は同じコレクションを表します
?>


add a note add a note User Contributed Notes Mongo::selectCollection
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites