Answer the question
In order to leave comments, you need to log in
How to query by date?
Hello! Such a question, there are 2 tables:
1 - events there are ordinary fields
- Name
- Age restrictions
- Category
2 - a table of programs, well, that is, some kind of event can take place on 8-9-10 - 11 -13 -15 November
- date
- ticket price
All this logic is already done.
The question is, I now want to pull out all past events, i.e. where each date is less than today.
Now when I write a request
$query->where(['<=', 'timetableevents.date', $today]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question