Error(select geo_articles.ID as idA, geo_articles.TITLE as tA, geo_articles.TITLE_SEO as tsA, geo_articles.SUMARY as resA, geo_articles.DATE_START as dateA, geo_articles.THUMBNAIL as image, geo_articles_sections.ID as idS, geo_articles_sections.TITLE as tS, geo_articles_sections.TITLE_SEO as tsS, geo_articles_sections.THUMB_WIDTH as image_W, geo_articles_sections.THUMB_HEIGHT as image_H, geo_paragraphs.TYPE as icon, geo_paragraphs.TEXT as text from geo_articles left join geo_articles_sections on geo_articles.IDSECTION = geo_articles_sections.ID left join geo_paragraphs on geo_articles.ID = geo_paragraphs.IDARTICLE and geo_paragraphs.POSITION = 1 where IDSECTION = 0 and STATUS = 1 and TRASH = 0 and DATE_START <= NOW() and (DATE_END = '00-00-00 00:00:00' or DATE_END >= NOW()) order by DATE_START desc limit 0, ): 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 '' at line 18