Mongo
PHP Manual

The MongoDB class

소개

Instances of this class are used to interact with a database. To get a database:

<?php
$m = new Mongo(); // connect
$db = $m->selectDB("example");
?>
Database names can use almost any character in the ASCII range. However, they cannot contain " ", "." or be the empty string.

A few unusual, but valid, database names: "null", "[x,y]", "3", "\"", "/".

Unlike collection names, database names may contain "$".

클래스 개요

MongoDB
MongoDB {
/* Methods */
public array command ( array $data )
__construct ( Mongo $conn , string $name )
public MongoCollection createCollection ( string $name [, bool $capped= FALSE [, int $size= 0 [, int $max= 0 ]]] )
public array createDBRef ( mixed $ns , mixed $a )
public array drop ( void )
public array dropCollection ( mixed $coll )
public array execute ( mixed $code [, array $args= array() ] )
public array getCursorInfo ( void )
public array getDBRef ( array $ref )
public MongoGridFS getGridFS ([ string $arg1= "fs" [, string $arg2= NULL ]] )
public int getProfilingLevel ( void )
public array listCollections ( void )
public array repair ([ bool $preserve_cloned_files= FALSE [, bool $backup_original_files= FALSE ]] )
public MongoCollection selectCollection ( string $name )
public int setProfilingLevel ( int $level )
public string __toString ( void )
}

Table of Contents


Mongo
PHP Manual