php - how to fetch data from table based on date range(last day, last week, last month,last year) in a single query? -


i have table called sales displayed below:

s.no        item_sold       date  1           soap            25.07.2017  2           bisket          19.07.2017  3           chocklate       26.06.2017  4           milk            26.06.2016 

use subdate(current_date, 1) , between.

eg. records between yesterday , day before yesterday. can this:

select .. ... your_date_column between  subdate(current_date, 1) , subdate(current_date, 2) 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -