How get current month records in Mysql? |
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 |
Messages In This Thread |
How get current month records in Mysql? - by omid_student - 05-10-2022, 05:11 AM
RE: How get current month records in Mysql? - by php_rocs - 05-10-2022, 05:50 AM
RE: How get current month records in Mysql? - by demyr - 05-10-2022, 12:53 PM
|