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

search for in the

MongoDB::authenticate> <Mongo::__toString
Last updated: Fri, 20 Nov 2009

view this page in

The MongoDB class

Introduction

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 "$".

Class synopsis

MongoDB
MongoDB {
/* Constants */
int $PROFILING_OFF = 0 ;
int $PROFILING_SLOW = 1 ;
int $PROFILING_ON = 2 ;
/* Methods */
public array authenticate ( string $username , string $password )
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 bool forceError ( void )
public array getDBRef ( array $ref )
public MongoGridFS getGridFS ([ string $arg1 = "fs" [, string $arg2 = NULL ]] )
public int getProfilingLevel ( void )
public array lastError ( void )
public array listCollections ( void )
public array prevError ( void )
public array repair ([ bool $preserve_cloned_files = FALSE [, bool $backup_original_files = FALSE ]] )
public array resetError ( void )
public MongoCollection selectCollection ( string $name )
public int setProfilingLevel ( int $level )
public string __toString ( void )
}

Table of Contents



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

MongoDB::authenticate> <Mongo::__toString
Last updated: Fri, 20 Nov 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites