Mongo クラス
導入
MongoDB と PHP を接続します。
このクラスを使用して接続を確立し、 データベースサーバのコマンドを実行します。使い方は次のようになります。
<?php
$m = new Mongo(); // 接続
$db = $m->selectDatabase(); // データベースオブジェクトの取得
?>
クラス概要
Mongo
Mongo
{
/* メソッド */
__construct
([ string $server = NULL
[, boolean $connect = TRUE
[, boolean $persistent = FALSE
[, boolean $paired = FALSE
]]]] )
}目次
- Mongo::close — データベースとの接続を閉じる
- Mongo::connect — データベースサーバに接続する
- Mongo::connectUtil — データベースサーバに接続する
- Mongo::__construct — 新しいデータベース接続オブジェクトを作成する
- Mongo::dropDB — データベースを削除する
- Mongo::forceError — データベースエラーを作成する [非推奨]
- Mongo::lastError — 直近のデータベース操作でエラーが発生したかどうかを調べる [非推奨]
- Mongo::pairConnect — ペアのデータベースサーバに接続する
- Mongo::pairPersistConnect — ペアのデータベースサーバへの持続的接続を作成する
- Mongo::persistConnect — データベースサーバへの持続的接続を作成する
- Mongo::prevError — データベースの操作中にスローされた直近のエラーを調べる [非推奨]
- Mongo::resetError — 接続時に発生したエラーを消去する [非推奨]
- Mongo::selectCollection — データベースコレクションを取得する
- Mongo::selectDB — データベースを取得する
- Mongo::__toString — この接続の文字列表現
Mongo
There are no user contributed notes for this page.
