I have fetched data within date range.
query = "SELECT * FROM table WHERE (date BETWEEN '2020-01-01' AND '2020-12-31')";
Its working well shows data between dates but when I search perticular data within date range it is showing all matched records outside date range.
query = "SELECT * FROM table WHERE (date BETWEEN '2020-01-01' AND '2020-12-31') AND ID LIKE '%dhaval%' OR firstname LIKE '%dhaval%' OR lastname LIKE '%dhaval%' ";
Above query searches all data named dhaval in entire table.
I want searched data within date range how can I do this ?