|
MongoClient::__getGets a database Description
public MongoDB MongoClient::__get
( string
$dbname
)This is the cleanest way of getting a database. If the database name has any special characters, MongoClient::selectDB will need to be used; however, this should be sufficient for most cases.
<?php Parameters
Return ValuesReturns a new db object. Errors/ExceptionsThrows a generic exception if the database name is invalid. |