I've a problem that's getting me crazy!
I need to translate the following Mongo query in PHP:
db.mycollection.find({$or: [ {'field.a': 45.4689, 'field.b': 9.18103}, {'field.a' : 40.71455, 'field.b': -74.007124} ]})
It works perfectly from the shell.
I think the query should be translated to PHP in the following way (var_dump):
Array
(
[$or] => Array
(
[0] => Array
(
[field.a] => 45.468945
[field.b] => 9.18103
)
[1] => Array
(
[field.a] => 40.71455
[field.b] => -74.007124
)
)
)
but I get no results in PHP!
Why? What's wrong? What's the correct syntax?
Thank you!