Created
May 1, 2011 03:04
-
-
Save gatesvp/950206 to your computer and use it in GitHub Desktop.
Testing spaces + PHP + mongodb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $mongo = new Mongo(); | |
| $coll = $mongo->selectCollection('foo', 'documents'); | |
| $coll->drop(); | |
| $coll->insert( array( "bar foo" => array( 'bah baz' => 2 ) ) ); | |
| $res = $coll->find(array('bar foo.bah baz' => 2)); | |
| foreach($res as $r){ | |
| print_r($r); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment