how to search database on two fields using regex
Posted: Wed Dec 18, 2013 8:06 am
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