Question
Can't resolve MySQL error
I'm trying to set up a listing page in DW CS4. Can anyone
tell me why I'm getting this MySQL error (#1054):
Unknown column 'startPostDate' in 'where clause'
from the following MySQL code?
SELECT CONCAT_WS('-', EVENTS.startPostYear, EVENTS.startPostMonth, EVENTS.startPostDay) AS startPostDate,
CONCAT_WS('-', EVENTS.stopPostYear, EVENTS.stopPostMonth,EVENTS.stopPostDay) AS stopPostDate
FROM EVENTS
WHERE NOW() >= startPostDate AND NOW() < stopPostDate
I'm new to all this and have been trying everything I can think of, such as adding "EVENTS." in front of my column aliases. Nothing is working. I'm very stuck now.
Thank you!
Unknown column 'startPostDate' in 'where clause'
from the following MySQL code?
SELECT CONCAT_WS('-', EVENTS.startPostYear, EVENTS.startPostMonth, EVENTS.startPostDay) AS startPostDate,
CONCAT_WS('-', EVENTS.stopPostYear, EVENTS.stopPostMonth,EVENTS.stopPostDay) AS stopPostDate
FROM EVENTS
WHERE NOW() >= startPostDate AND NOW() < stopPostDate
I'm new to all this and have been trying everything I can think of, such as adding "EVENTS." in front of my column aliases. Nothing is working. I'm very stuck now.
Thank you!
