INVALID SQL: 1064 : 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 'where date_format(start_date, '%m%d%Y') <= date_format(now(), '%m%d%Y') and date' at line 1 SQL QUERY FAILURE:select announcements_text from where date_format(start_date, '%m%d%Y') <= date_format(now(), '%m%d%Y') and date_format(expires_date, '%m%d%Y') >= date_format(now(), '%m%d%Y') and en_annou = 'Y' Sporty K9, Ltd.