I have this table:
ID dayNum dayName eventTypeID
-------------------------------------------
1 4 Wednesday 1
2 7 Saturday 1
For an eventTypeID
I want to select the row that contains the future or current day. Today is Thursday, so how can I return the row where dayName
is Saturday?
I just need an AND
statement for the below query:
SELECT *
FROM `events`
WHERE `eventTypeID` = 1
AND ??
dayNum:
The dayNum
field is the index for each day, where Monday = 1
, and Saturday = 7
.
If you can come up with an answer to this, just hard code today's day number as 5
(Thursday). I already have the logic to get today's dayNum
, and it's not really relevant to the question.