Voting

: seven plus zero?
(Example: nine)

The Note You're Voting On

salos_12 at hotmail dot com
5 years ago
When your database name contains a "-" (e.g. database-name) you need to use a string instead.

<?php

$client
= new MongoDB\Client("mongodb://ip_address:port");
$collection = $client->{'database-name'}->collection;

?>

<< Back to user notes page

To Top