Cannot query the database.

select a.*, b.Name as Type from oaa_events a, event_types b where a.status = 'enabled' and a.TypeID= b.ID and a.publisheddate <= unix_timestamp() and a.startdate >= unix_timestamp() - 86400 * 180 and ( ( from_unixtime(startdate, '%Y%m') = 201810) OR (from_unixtime(startdate, '%Y%m') <= 201810 and from_unixtime(enddate, '%Y%m') >= 201810) ) order by a.startdate desc

Error:
Unknown column 'a.publisheddate' in 'where clause'
Trace: (database.class.php:120)
(main.class.php:439)
(main.class.php:6573)
(main.class.php:6638)
(main.class.php:9352)
(manager.class.php:23)
(document.class.php:314)
(document.class.php:205)
(index.php:38)