Run your SQL statement as a PHP script on the commandline within a cron-job (aka. "scheduled task" on Windows), at 0500 hours each day. Write the output into a text log file, somewhere, or something, along with the data, and whatever other date you want added.
|