Showing posts with label Database. Show all posts
Showing posts with label Database. Show all posts

Wednesday, 25 April 2018

How to get Last Month's record data from MySQL Database?



SELECT * from product_order WHERE YEAR(order_date) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH) and MONTH(order_date) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)



Tuesday, 24 April 2018

How to get This Month's record data from MySQL Database?


SELECT * from product_order WHERE MONTH(order_date) = MONTH(NOW()) and YEAR(order_date) = YEAR(NOW())


Saturday, 21 April 2018