Modified cleanReadings also added code to remove the id column of the readings table and then add it back so that the auto_increment count gets reset every 24 hours.