|
MongoClient::__getGets a database This extension that defines this method is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this method in the new extension, but there is an alternative in the PHP library: Beschreibung
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.
<?phpParameter-Liste
RückgabewerteReturns a new db object. Fehler/ExceptionsThrows a generic exception if the database name is invalid. |