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 IssueDateTime >= now() - INTERVAL 1 DAY GROUP BY timekey ' at line 3 Fatal error: Call to a member function fetch_array() on a non-object in /var/www/domains/updownradar.co.uk/data/DataAccess.class on line 144