[Error]

Wrong Query : SELECT gen_sites_options.id_sites_options,gen_sites_options.id_site,CASE WHEN i18n_lib.lib !='' THEN i18n_lib.lib ELSE CASE WHEN i18n_master_lib.lib !='' THEN i18n_master_lib.lib ELSE gen_sites_options.lib END END AS lib,CASE WHEN i18n_created_at.lib !='' THEN i18n_created_at.lib ELSE CASE WHEN i18n_master_created_at.lib !='' THEN i18n_master_created_at.lib ELSE gen_sites_options.created_at END END AS created_at,CASE WHEN i18n_updated_at.lib !='' THEN i18n_updated_at.lib ELSE CASE WHEN i18n_master_updated_at.lib !='' THEN i18n_master_updated_at.lib ELSE gen_sites_options.updated_at END END AS updated_at,CASE WHEN i18n_value.lib !='' THEN i18n_value.lib ELSE CASE WHEN i18n_master_value.lib !='' THEN i18n_master_value.lib ELSE gen_sites_options.value END END AS value,CASE WHEN i18n_press_form.lib !='' THEN i18n_press_form.lib ELSE CASE WHEN i18n_master_press_form.lib !='' THEN i18n_master_press_form.lib ELSE gen_sites_options.press_form END END AS press_form,CASE WHEN i18n_help_mod.lib !='' THEN i18n_help_mod.lib ELSE CASE WHEN i18n_master_help_mod.lib !='' THEN i18n_master_help_mod.lib ELSE gen_sites_options.help_mod END END AS help_mod,CASE WHEN i18n_legals_mod.lib !='' THEN i18n_legals_mod.lib ELSE CASE WHEN i18n_master_legals_mod.lib !='' THEN i18n_master_legals_mod.lib ELSE gen_sites_options.legals_mod END END AS legals_mod,CASE WHEN i18n_partner_mod.lib !='' THEN i18n_partner_mod.lib ELSE CASE WHEN i18n_master_partner_mod.lib !='' THEN i18n_master_partner_mod.lib ELSE gen_sites_options.partner_mod END END AS partner_mod,CASE WHEN i18n_recruit_mod.lib !='' THEN i18n_recruit_mod.lib ELSE CASE WHEN i18n_master_recruit_mod.lib !='' THEN i18n_master_recruit_mod.lib ELSE gen_sites_options.recruit_mod END END AS recruit_mod,CASE WHEN i18n_press_mod.lib !='' THEN i18n_press_mod.lib ELSE CASE WHEN i18n_master_press_mod.lib !='' THEN i18n_master_press_mod.lib ELSE gen_sites_options.press_mod END END AS press_mod,CASE WHEN i18n_contact_mod.lib !='' THEN i18n_contact_mod.lib ELSE CASE WHEN i18n_master_contact_mod.lib !='' THEN i18n_master_contact_mod.lib ELSE gen_sites_options.contact_mod END END AS contact_mod,CASE WHEN i18n_pos_mod.lib !='' THEN i18n_pos_mod.lib ELSE CASE WHEN i18n_master_pos_mod.lib !='' THEN i18n_master_pos_mod.lib ELSE gen_sites_options.pos_mod END END AS pos_mod,CASE WHEN i18n_flag_mod.lib !='' THEN i18n_flag_mod.lib ELSE CASE WHEN i18n_master_flag_mod.lib !='' THEN i18n_master_flag_mod.lib ELSE gen_sites_options.flag_mod END END AS flag_mod,CASE WHEN i18n_analytics_tag.lib !='' THEN i18n_analytics_tag.lib ELSE CASE WHEN i18n_master_analytics_tag.lib !='' THEN i18n_master_analytics_tag.lib ELSE gen_sites_options.analytics_tag END END AS analytics_tag,CASE WHEN i18n_pdv_show_by_country.lib !='' THEN i18n_pdv_show_by_country.lib ELSE CASE WHEN i18n_master_pdv_show_by_country.lib !='' THEN i18n_master_pdv_show_by_country.lib ELSE gen_sites_options.pdv_show_by_country END END AS pdv_show_by_country,CASE WHEN i18n_form_contact_dest.lib !='' THEN i18n_form_contact_dest.lib ELSE CASE WHEN i18n_master_form_contact_dest.lib !='' THEN i18n_master_form_contact_dest.lib ELSE gen_sites_options.form_contact_dest END END AS form_contact_dest,CASE WHEN i18n_form_presse_dest.lib !='' THEN i18n_form_presse_dest.lib ELSE CASE WHEN i18n_master_form_presse_dest.lib !='' THEN i18n_master_form_presse_dest.lib ELSE gen_sites_options.form_presse_dest END END AS form_presse_dest,CASE WHEN i18n_form_distributeur_dest.lib !='' THEN i18n_form_distributeur_dest.lib ELSE CASE WHEN i18n_master_form_distributeur_dest.lib !='' THEN i18n_master_form_distributeur_dest.lib ELSE gen_sites_options.form_distributeur_dest END END AS form_distributeur_dest,CASE WHEN i18n_form_depositaire_dest.lib !='' THEN i18n_form_depositaire_dest.lib ELSE CASE WHEN i18n_master_form_depositaire_dest.lib !='' THEN i18n_master_form_depositaire_dest.lib ELSE gen_sites_options.form_depositaire_dest END END AS form_depositaire_dest, i18n_lib.is_published FROM gen_sites_options LEFT JOIN gen_i18n i18n_lib ON ( i18n_lib.id_element = gen_sites_options.id_sites_options AND i18n_lib.id_locales =97 AND i18n_lib.module = 'sites_options' AND i18n_lib.field_name = 'lib' ) LEFT JOIN gen_i18n i18n_master_lib ON ( i18n_master_lib.id_element = gen_sites_options.id_sites_options AND i18n_master_lib.id_locales = AND i18n_master_lib.module = 'sites_options' AND i18n_master_lib.field_name = 'lib' ) LEFT JOIN gen_i18n i18n_created_at ON ( i18n_created_at.id_element = gen_sites_options.id_sites_options AND i18n_created_at.id_locales =97 AND i18n_created_at.module = 'sites_options' AND i18n_created_at.field_name = 'created_at' ) LEFT JOIN gen_i18n i18n_master_created_at ON ( i18n_master_created_at.id_element = gen_sites_options.id_sites_options AND i18n_master_created_at.id_locales = AND i18n_master_created_at.module = 'sites_options' AND i18n_master_created_at.field_name = 'created_at' ) LEFT JOIN gen_i18n i18n_updated_at ON ( i18n_updated_at.id_element = gen_sites_options.id_sites_options AND i18n_updated_at.id_locales =97 AND i18n_updated_at.module = 'sites_options' AND i18n_updated_at.field_name = 'updated_at' ) LEFT JOIN gen_i18n i18n_master_updated_at ON ( i18n_master_updated_at.id_element = gen_sites_options.id_sites_options AND i18n_master_updated_at.id_locales = AND i18n_master_updated_at.module = 'sites_options' AND i18n_master_updated_at.field_name = 'updated_at' ) LEFT JOIN gen_i18n i18n_value ON ( i18n_value.id_element = gen_sites_options.id_sites_options AND i18n_value.id_locales =97 AND i18n_value.module = 'sites_options' AND i18n_value.field_name = 'value' ) LEFT JOIN gen_i18n i18n_master_value ON ( i18n_master_value.id_element = gen_sites_options.id_sites_options AND i18n_master_value.id_locales = AND i18n_master_value.module = 'sites_options' AND i18n_master_value.field_name = 'value' ) LEFT JOIN gen_i18n i18n_press_form ON ( i18n_press_form.id_element = gen_sites_options.id_sites_options AND i18n_press_form.id_locales =97 AND i18n_press_form.module = 'sites_options' AND i18n_press_form.field_name = 'press_form' ) LEFT JOIN gen_i18n i18n_master_press_form ON ( i18n_master_press_form.id_element = gen_sites_options.id_sites_options AND i18n_master_press_form.id_locales = AND i18n_master_press_form.module = 'sites_options' AND i18n_master_press_form.field_name = 'press_form' ) LEFT JOIN gen_i18n i18n_help_mod ON ( i18n_help_mod.id_element = gen_sites_options.id_sites_options AND i18n_help_mod.id_locales =97 AND i18n_help_mod.module = 'sites_options' AND i18n_help_mod.field_name = 'help_mod' ) LEFT JOIN gen_i18n i18n_master_help_mod ON ( i18n_master_help_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_help_mod.id_locales = AND i18n_master_help_mod.module = 'sites_options' AND i18n_master_help_mod.field_name = 'help_mod' ) LEFT JOIN gen_i18n i18n_legals_mod ON ( i18n_legals_mod.id_element = gen_sites_options.id_sites_options AND i18n_legals_mod.id_locales =97 AND i18n_legals_mod.module = 'sites_options' AND i18n_legals_mod.field_name = 'legals_mod' ) LEFT JOIN gen_i18n i18n_master_legals_mod ON ( i18n_master_legals_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_legals_mod.id_locales = AND i18n_master_legals_mod.module = 'sites_options' AND i18n_master_legals_mod.field_name = 'legals_mod' ) LEFT JOIN gen_i18n i18n_partner_mod ON ( i18n_partner_mod.id_element = gen_sites_options.id_sites_options AND i18n_partner_mod.id_locales =97 AND i18n_partner_mod.module = 'sites_options' AND i18n_partner_mod.field_name = 'partner_mod' ) LEFT JOIN gen_i18n i18n_master_partner_mod ON ( i18n_master_partner_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_partner_mod.id_locales = AND i18n_master_partner_mod.module = 'sites_options' AND i18n_master_partner_mod.field_name = 'partner_mod' ) LEFT JOIN gen_i18n i18n_recruit_mod ON ( i18n_recruit_mod.id_element = gen_sites_options.id_sites_options AND i18n_recruit_mod.id_locales =97 AND i18n_recruit_mod.module = 'sites_options' AND i18n_recruit_mod.field_name = 'recruit_mod' ) LEFT JOIN gen_i18n i18n_master_recruit_mod ON ( i18n_master_recruit_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_recruit_mod.id_locales = AND i18n_master_recruit_mod.module = 'sites_options' AND i18n_master_recruit_mod.field_name = 'recruit_mod' ) LEFT JOIN gen_i18n i18n_press_mod ON ( i18n_press_mod.id_element = gen_sites_options.id_sites_options AND i18n_press_mod.id_locales =97 AND i18n_press_mod.module = 'sites_options' AND i18n_press_mod.field_name = 'press_mod' ) LEFT JOIN gen_i18n i18n_master_press_mod ON ( i18n_master_press_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_press_mod.id_locales = AND i18n_master_press_mod.module = 'sites_options' AND i18n_master_press_mod.field_name = 'press_mod' ) LEFT JOIN gen_i18n i18n_contact_mod ON ( i18n_contact_mod.id_element = gen_sites_options.id_sites_options AND i18n_contact_mod.id_locales =97 AND i18n_contact_mod.module = 'sites_options' AND i18n_contact_mod.field_name = 'contact_mod' ) LEFT JOIN gen_i18n i18n_master_contact_mod ON ( i18n_master_contact_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_contact_mod.id_locales = AND i18n_master_contact_mod.module = 'sites_options' AND i18n_master_contact_mod.field_name = 'contact_mod' ) LEFT JOIN gen_i18n i18n_pos_mod ON ( i18n_pos_mod.id_element = gen_sites_options.id_sites_options AND i18n_pos_mod.id_locales =97 AND i18n_pos_mod.module = 'sites_options' AND i18n_pos_mod.field_name = 'pos_mod' ) LEFT JOIN gen_i18n i18n_master_pos_mod ON ( i18n_master_pos_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_pos_mod.id_locales = AND i18n_master_pos_mod.module = 'sites_options' AND i18n_master_pos_mod.field_name = 'pos_mod' ) LEFT JOIN gen_i18n i18n_flag_mod ON ( i18n_flag_mod.id_element = gen_sites_options.id_sites_options AND i18n_flag_mod.id_locales =97 AND i18n_flag_mod.module = 'sites_options' AND i18n_flag_mod.field_name = 'flag_mod' ) LEFT JOIN gen_i18n i18n_master_flag_mod ON ( i18n_master_flag_mod.id_element = gen_sites_options.id_sites_options AND i18n_master_flag_mod.id_locales = AND i18n_master_flag_mod.module = 'sites_options' AND i18n_master_flag_mod.field_name = 'flag_mod' ) LEFT JOIN gen_i18n i18n_analytics_tag ON ( i18n_analytics_tag.id_element = gen_sites_options.id_sites_options AND i18n_analytics_tag.id_locales =97 AND i18n_analytics_tag.module = 'sites_options' AND i18n_analytics_tag.field_name = 'analytics_tag' ) LEFT JOIN gen_i18n i18n_master_analytics_tag ON ( i18n_master_analytics_tag.id_element = gen_sites_options.id_sites_options AND i18n_master_analytics_tag.id_locales = AND i18n_master_analytics_tag.module = 'sites_options' AND i18n_master_analytics_tag.field_name = 'analytics_tag' ) LEFT JOIN gen_i18n i18n_pdv_show_by_country ON ( i18n_pdv_show_by_country.id_element = gen_sites_options.id_sites_options AND i18n_pdv_show_by_country.id_locales =97 AND i18n_pdv_show_by_country.module = 'sites_options' AND i18n_pdv_show_by_country.field_name = 'pdv_show_by_country' ) LEFT JOIN gen_i18n i18n_master_pdv_show_by_country ON ( i18n_master_pdv_show_by_country.id_element = gen_sites_options.id_sites_options AND i18n_master_pdv_show_by_country.id_locales = AND i18n_master_pdv_show_by_country.module = 'sites_options' AND i18n_master_pdv_show_by_country.field_name = 'pdv_show_by_country' ) LEFT JOIN gen_i18n i18n_form_contact_dest ON ( i18n_form_contact_dest.id_element = gen_sites_options.id_sites_options AND i18n_form_contact_dest.id_locales =97 AND i18n_form_contact_dest.module = 'sites_options' AND i18n_form_contact_dest.field_name = 'form_contact_dest' ) LEFT JOIN gen_i18n i18n_master_form_contact_dest ON ( i18n_master_form_contact_dest.id_element = gen_sites_options.id_sites_options AND i18n_master_form_contact_dest.id_locales = AND i18n_master_form_contact_dest.module = 'sites_options' AND i18n_master_form_contact_dest.field_name = 'form_contact_dest' ) LEFT JOIN gen_i18n i18n_form_presse_dest ON ( i18n_form_presse_dest.id_element = gen_sites_options.id_sites_options AND i18n_form_presse_dest.id_locales =97 AND i18n_form_presse_dest.module = 'sites_options' AND i18n_form_presse_dest.field_name = 'form_presse_dest' ) LEFT JOIN gen_i18n i18n_master_form_presse_dest ON ( i18n_master_form_presse_dest.id_element = gen_sites_options.id_sites_options AND i18n_master_form_presse_dest.id_locales = AND i18n_master_form_presse_dest.module = 'sites_options' AND i18n_master_form_presse_dest.field_name = 'form_presse_dest' ) LEFT JOIN gen_i18n i18n_form_distributeur_dest ON ( i18n_form_distributeur_dest.id_element = gen_sites_options.id_sites_options AND i18n_form_distributeur_dest.id_locales =97 AND i18n_form_distributeur_dest.module = 'sites_options' AND i18n_form_distributeur_dest.field_name = 'form_distributeur_dest' ) LEFT JOIN gen_i18n i18n_master_form_distributeur_dest ON ( i18n_master_form_distributeur_dest.id_element = gen_sites_options.id_sites_options AND i18n_master_form_distributeur_dest.id_locales = AND i18n_master_form_distributeur_dest.module = 'sites_options' AND i18n_master_form_distributeur_dest.field_name = 'form_distributeur_dest' ) LEFT JOIN gen_i18n i18n_form_depositaire_dest ON ( i18n_form_depositaire_dest.id_element = gen_sites_options.id_sites_options AND i18n_form_depositaire_dest.id_locales =97 AND i18n_form_depositaire_dest.module = 'sites_options' AND i18n_form_depositaire_dest.field_name = 'form_depositaire_dest' ) LEFT JOIN gen_i18n i18n_master_form_depositaire_dest ON ( i18n_master_form_depositaire_dest.id_element = gen_sites_options.id_sites_options AND i18n_master_form_depositaire_dest.id_locales = AND i18n_master_form_depositaire_dest.module = 'sites_options' AND i18n_master_form_depositaire_dest.field_name = 'form_depositaire_dest' ) where 1 and id_site = '92'
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 i18n_master_lib.module = 'sites_options' AND i18n_master' at line 8