Welcome Guest, Not a member yet? Register   Sign In
How get current month records in Mysql?
#1

I have many records for all days.
Some days have no data example 2020-12-10 or others.
When I use the below query:
SELECT COUNT(*),DATE(date_register) FROM tbl_order WHERE MONTH(NOW()) = 1
The query return only rows that exist for that date
How do I can set 0 for dates that not have any records
Thanks
Reply


Messages In This Thread
How get current month records in Mysql? - by omid_student - 05-10-2022, 05:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB