Answer the question
In order to leave comments, you need to log in
How to set monthly interval?
Tell me how to display data for the last month ( not for the last 30 days , but for the month: from the 1st to the last day of the previous month)? That is, to now count all the records that were added in September. The numbers added to the table are recorded.
I tried this, but this is just an example of what does not fit.add_date > now() - interval 30 day
Answer the question
In order to leave comments, you need to log in
If you are asking a question about SQL, you should specify the SQL tag, not PHP...add_date > last_day(now() - interval 1 month)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question