I have a table two DATE type fields in it: "from", "to" and an INT type field: "price".
Let's some records from the table
id itemid from to price
1 1 2017/12/01 2017/12/08 $100
2 1 2017/12/09 2017/12/16 $98
3 1 2017/12/17 2017/12/31 $99
4 2 2017/12/01 2017/12/07 $8
I'd like to filter records this way: I give a date in an own field on the top, click on a button and I get those records which are valid on the given day. For example I give date 2017/12/05 and get 2. and 4. records, because 2017/12/05 is between 'from' and 'to' in the 2. and in the 4. records. How can I customize searching this way?