I have long query on mongodb. I want to write that in php
The query looks like
"department":"xxx","rank":"xxx",
$and:[{"emails.email" :{$ne : ""}},{"emails.email":{$ne:null}}];
I want to convert into php.
“department”=>$xxx,”rank”=>$xxx..??
for converting ‘and’ I cant come up. please help
The best way to work with the $ modifiers is to use single quotes as seen below. It’s close on the syntax however you will want to double check it as I’m certain there may have been a missed bracket.
Good Luck!