Ketan Patil
Posts: 0
Joined: Tue Dec 03, 2013 1:10 pm

how to search database on two fields using regex

i wan to search into two fields form database.
if one is true i want to return that row.
for one field i am using the code
return '{"cat":{"$regex":"^'+value+'", "$options":"i"}}';

what would be the code for two fields?

pl. help

Return to “Issues”