Invalid query: 1 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM cbrf WHERE dat<=CURDATE() AND dat>DATE_SUB(CURDATE(),INTERVAL 7 DAY) ORDER ' at line 1