Domanda

in MongoHub i can use this query to find my result.

db.cache.collection01.find({'md5': "\u0000\u0000\b :\u0007\"" }).skip(0).limit(30)

How can i do it in PHP ? i tried this:

// Connect to test database
$m = new Mongo("mongodb://$dbhost");
$db = $m->$dbname;

// select the collection
$collection = $db->collection01;

// pull a cursor query
// search for fruits
$query = array('md5' => '"\u0000\u0000\b :\u0007\""');
$cursor = $collection->find($query);


foreach($cursor as $document) {
    var_dump($document);
}

Thanks

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top