This can be very easy to do, but I'm pretty new to MongoDB and I have problems with the correct rule.
I pull the presenters from the database, and I just want them to retrieve entries where the email field is not empty. I tried to insert an instruction to skip a record if it is not zero, but there are many fields that are not null, but they also have no characters. Here is my MongoDB request:
$records = $dbh->find('email' => array('$ne' => null))->limit(2000);
I also tried 'email' => array('$ne' => '')) , but that didn't help either.
Is there an easy way to do this? I know that in MySQL this would be just where email != "" , But I'm still learning my way around Mongo :) Thanks!
source share