MySQL column not found
Posted
by vian
on Stack Overflow
See other posts from Stack Overflow
or by vian
Published on 2010-04-06T17:05:19Z
Indexed on
2010/04/06
17:13 UTC
Read the original article
Hit count: 358
The SQL query without where statement runs great and outputs good results, but when I include WHERE condition it shows Unknown column 'date1' in 'where clause'. What's the problem?
SELECT IF(e.weekly, DATE_ADD(DATE(e.time), INTERVAL CEIL(DATEDIFF('2010-04-08', e.time)/7) WEEK), DATE(e.time)) AS `e.date1`, `v`.`lat`, `v`.`lng`
FROM `events` AS `e`
INNER JOIN `venues` AS `v` ON e.venue_id = v.id WHERE e.date1 > '2010-09-01'
© Stack Overflow or respective owner