CMySql::Exec() failed, Mysql returned : Unknown column 'dirk' in 'where clause', Query : SELECT cms_modules_agenda.*, cms_modules_editor_categories.CategoryName, cms_modules_editor_categories.CategoryLabel, cms_modules_editor_categories.CategoryLink FROM `cms_modules_agenda` JOIN cms_modules_editor_categories_config ON cms_modules_editor_categories_config.ModuleId = cms_modules_agenda.ModuleId AND cms_modules_editor_categories_config.ItemId = cms_modules_agenda.Id JOIN cms_modules_editor_categories ON cms_modules_editor_categories.Id = cms_modules_editor_categories_config.EditorCategoryId WHERE cms_modules_agenda.ModuleId='24' AND year(Date) = dirk ORDER BY Date DESC;