Syntax error, unexpected token AND, near to ' AgenciesArticles.publication_date <= CURDATE())', when parsing: SELECT Articles.id AS article_id, Articles.slug_fr AS slug_fr, Articles.slug_en AS slug_en, Articles.excerpt_fr AS excerpt_fr, Articles.excerpt_en AS excerpt_en, Articles.text_fr AS text_fr, Articles.text_en AS text_en, Articles.title_fr AS title_fr, Articles.title_en AS title_en, Articles.meta_desc_fr AS meta_desc_fr, Articles.meta_desc_en AS meta_desc_en, Articles.image_fr AS image_fr, Articles.image_en AS image_en, Articles.image_vedette_fr AS image_vedette_fr, Articles.image_vedette_en AS image_vedette_en, Articles.formatted_image_en_link, Articles.formatted_image_fr_link, Articles.formatted_image_vedette_en_link, Articles.formatted_image_vedette_fr_link, Articles.category_id AS category_id, ArticleCategories.name_fr AS category_name_fr, ArticleCategories.name_en AS category_name_en, ArticleCategories.special_category AS category_special_category, AgenciesArticles.agency_id AS agency_id, AgenciesArticles.publication_date AS publication_date, AgenciesArticles.en_vedette AS en_vedette FROM Articles LEFT JOIN AgenciesArticles ON Articles.id = AgenciesArticles.article_id LEFT JOIN Agencies ON AgenciesArticles.agency_id = Agencies.id LEFT JOIN ArticleCategories ON Articles.category_id = ArticleCategories.id WHERE (ArticleCategories.special_category = 1 AND AgenciesArticles.agency_id = AND AgenciesArticles.publication_date <= CURDATE()) (1714)