MySQL error: Unknown column 'es' in 'where clause' (SELECT a.*, r.*, c.* FROM competition AS c LEFT JOIN account AS a ON a.id=c.account_id LEFT JOIN reg_fo AS r ON a.id=r.account_id WHERE approved=1 AND category=es AND c.type=2 ORDER BY a.created DESC) MySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'OR notice_calendar.cal_uid='competition')
AND notice_calendar.date>171191...' at line 5 (SELECT notice.*, notice_content.title, DATE_FORMAT(FROM_UNIXTIME(notice_calendar.date),'%d') AS day, notice_calendar.* FROM notice, notice_content, notice_calendar
WHERE notice.id=notice_calendar.notice_id
AND notice.id=notice_content.notice_id
AND notice_content.lang='uk'
AND (notice.root_id= OR notice_calendar.cal_uid='competition')
AND notice_calendar.date>1711918800
AND notice_calendar.date<1714510800
AND (notice.approved=1 OR notice.approved=-1)
ORDER BY notice_calendar.date, notice_calendar.time ASC
) www.elamigocubano.com