You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND YEAR(c.`date_add`) >= '2018' ORDER BY c.`id_cm' at line 8

            SELECT c.`id_cms`, cl.`meta_title`
            FROM `ps_cms` AS c
            LEFT JOIN `ps_cms_lang` AS cl
                ON c.`id_cms` = cl.`id_cms`
                    AND cl.`id_lang` = 8
            WHERE c.`active` = '1'
                AND c.`id_cms_category` = '2'
                AND c.`id_cms` NOT IN (SELECT `id_newsletter` FROM `ps_shown_newsletters` WHERE `id_customer` = )
                AND YEAR(c.`date_add`) >= '2018'
            ORDER BY c.`id_cms` DESC
            LIMIT 10