[Error]

Wrong Query : SELECT gen_news.id_news,gen_news.id_site,gen_news.id_produits,gen_news.id_news_categories,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_news.updated_at END END AS updated_at,CASE WHEN i18n_lib.lib !='' THEN i18n_lib.lib ELSE CASE WHEN i18n_master_lib.lib !='' THEN i18n_master_lib.lib ELSE gen_news.lib END END AS lib,CASE WHEN i18n_homepage_lib.lib !='' THEN i18n_homepage_lib.lib ELSE CASE WHEN i18n_master_homepage_lib.lib !='' THEN i18n_master_homepage_lib.lib ELSE gen_news.homepage_lib END END AS homepage_lib,CASE WHEN i18n_content.lib !='' THEN i18n_content.lib ELSE CASE WHEN i18n_master_content.lib !='' THEN i18n_master_content.lib ELSE gen_news.content END END AS content,CASE WHEN i18n_file.lib !='' THEN i18n_file.lib ELSE CASE WHEN i18n_master_file.lib !='' THEN i18n_master_file.lib ELSE gen_news.file END END AS file,CASE WHEN i18n_date_lib.lib !='' THEN i18n_date_lib.lib ELSE CASE WHEN i18n_master_date_lib.lib !='' THEN i18n_master_date_lib.lib ELSE gen_news.date_lib END END AS date_lib,CASE WHEN i18n_is_valid.lib !='' THEN i18n_is_valid.lib ELSE CASE WHEN i18n_master_is_valid.lib !='' THEN i18n_master_is_valid.lib ELSE gen_news.is_valid END END AS is_valid,CASE WHEN i18n_url.lib !='' THEN i18n_url.lib ELSE CASE WHEN i18n_master_url.lib !='' THEN i18n_master_url.lib ELSE gen_news.url END END AS url,CASE WHEN i18n_author.lib !='' THEN i18n_author.lib ELSE CASE WHEN i18n_master_author.lib !='' THEN i18n_master_author.lib ELSE gen_news.author END END AS author, i18n_lib.is_published FROM gen_news LEFT JOIN gen_i18n i18n_updated_at ON ( i18n_updated_at.id_element = gen_news.id_news AND i18n_updated_at.id_locales =1 AND i18n_updated_at.module = 'news' AND i18n_updated_at.field_name = 'updated_at' ) LEFT JOIN gen_i18n i18n_master_updated_at ON ( i18n_master_updated_at.id_element = gen_news.id_news AND i18n_master_updated_at.id_locales =2 AND i18n_master_updated_at.module = 'news' AND i18n_master_updated_at.field_name = 'updated_at' ) LEFT JOIN gen_i18n i18n_lib ON ( i18n_lib.id_element = gen_news.id_news AND i18n_lib.id_locales =1 AND i18n_lib.module = 'news' AND i18n_lib.field_name = 'lib' ) LEFT JOIN gen_i18n i18n_master_lib ON ( i18n_master_lib.id_element = gen_news.id_news AND i18n_master_lib.id_locales =2 AND i18n_master_lib.module = 'news' AND i18n_master_lib.field_name = 'lib' ) LEFT JOIN gen_i18n i18n_homepage_lib ON ( i18n_homepage_lib.id_element = gen_news.id_news AND i18n_homepage_lib.id_locales =1 AND i18n_homepage_lib.module = 'news' AND i18n_homepage_lib.field_name = 'homepage_lib' ) LEFT JOIN gen_i18n i18n_master_homepage_lib ON ( i18n_master_homepage_lib.id_element = gen_news.id_news AND i18n_master_homepage_lib.id_locales =2 AND i18n_master_homepage_lib.module = 'news' AND i18n_master_homepage_lib.field_name = 'homepage_lib' ) LEFT JOIN gen_i18n i18n_content ON ( i18n_content.id_element = gen_news.id_news AND i18n_content.id_locales =1 AND i18n_content.module = 'news' AND i18n_content.field_name = 'content' ) LEFT JOIN gen_i18n i18n_master_content ON ( i18n_master_content.id_element = gen_news.id_news AND i18n_master_content.id_locales =2 AND i18n_master_content.module = 'news' AND i18n_master_content.field_name = 'content' ) LEFT JOIN gen_i18n i18n_file ON ( i18n_file.id_element = gen_news.id_news AND i18n_file.id_locales =1 AND i18n_file.module = 'news' AND i18n_file.field_name = 'file' ) LEFT JOIN gen_i18n i18n_master_file ON ( i18n_master_file.id_element = gen_news.id_news AND i18n_master_file.id_locales =2 AND i18n_master_file.module = 'news' AND i18n_master_file.field_name = 'file' ) LEFT JOIN gen_i18n i18n_date_lib ON ( i18n_date_lib.id_element = gen_news.id_news AND i18n_date_lib.id_locales =1 AND i18n_date_lib.module = 'news' AND i18n_date_lib.field_name = 'date_lib' ) LEFT JOIN gen_i18n i18n_master_date_lib ON ( i18n_master_date_lib.id_element = gen_news.id_news AND i18n_master_date_lib.id_locales =2 AND i18n_master_date_lib.module = 'news' AND i18n_master_date_lib.field_name = 'date_lib' ) LEFT JOIN gen_i18n i18n_is_valid ON ( i18n_is_valid.id_element = gen_news.id_news AND i18n_is_valid.id_locales =1 AND i18n_is_valid.module = 'news' AND i18n_is_valid.field_name = 'is_valid' ) LEFT JOIN gen_i18n i18n_master_is_valid ON ( i18n_master_is_valid.id_element = gen_news.id_news AND i18n_master_is_valid.id_locales =2 AND i18n_master_is_valid.module = 'news' AND i18n_master_is_valid.field_name = 'is_valid' ) LEFT JOIN gen_i18n i18n_url ON ( i18n_url.id_element = gen_news.id_news AND i18n_url.id_locales =1 AND i18n_url.module = 'news' AND i18n_url.field_name = 'url' ) LEFT JOIN gen_i18n i18n_master_url ON ( i18n_master_url.id_element = gen_news.id_news AND i18n_master_url.id_locales =2 AND i18n_master_url.module = 'news' AND i18n_master_url.field_name = 'url' ) LEFT JOIN gen_i18n i18n_author ON ( i18n_author.id_element = gen_news.id_news AND i18n_author.id_locales =1 AND i18n_author.module = 'news' AND i18n_author.field_name = 'author' ) LEFT JOIN gen_i18n i18n_master_author ON ( i18n_master_author.id_element = gen_news.id_news AND i18n_master_author.id_locales =2 AND i18n_master_author.module = 'news' AND i18n_master_author.field_name = 'author' ) where 1 and id_site = '74' having is_valid = '1' order by date_lib desc limit 5 offset -5
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 '-5' at line 73