Multiple where clause from 2 localstorage variables
Hi,
First of all thank you for your great product; although I'm relatively new to all this, I'm making great progress on my project.
I'm running into something that's beyond me though. My app is supposed to register how much water I drink each day, which it does nicely. Only I can't get it to only display today's results in a feedback page. It is possible to display all results belonging to one user, using a single where-clause: return "{'user':{'$regex':'(?i)."+ value +".'}}";
However, I cant' get the app to display only today's results using a multiple where clause, which looks something like:
return "{'$and':[{'user':{'$regex':'(?i).'"+ value +"'.'}},{'date': {'$regex':'(?i).'"+ Apperyio.storage.todaysdate.get() +"'.'}}]}";
The storage variable todaysdate is tested and populated with today's date; writes to the database alright to column 'date'. So that should all be alright...
Any tips?
Thank you very much in advance,
best,
Sander