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 `dag` >= NOW() - INTERVAL 10 DAY AND `dag` < NOW() + INTERVAL 10 DA' at line 1select * from uren_uitzondering where tem_id = and `dag` >= NOW() - INTERVAL 10 DAY AND `dag` < NOW() + INTERVAL 10 DAY