I plan on running a php job to create an xml feed once a week. However, I will be running the job manually, so it will not be *exactly* once a week, it will be 7 days 3 hours and 11 minutes or 6 days 22 hours and 57 minutes, you get the idea. I want to keep the time of the previous DB call in a flat file, then I want to database query to only return records from that time forward. If this is an overly simple question, kindly direct me to the proper thread.
How about something like this?: $lastRun = "11/16/2007 19:03:21"; $lastRunEpoch = strtotime($lastRun); $query = 'SELECT * FROM tablename WHERE timestampcolumn > (FROM_UNIXTIME(' . $lastRunEpoch . '))'; PHP: Only instead of $lastRun being set here you would have it pulled from your text file. And then maybe write the current date to your text file after the query is executed for the next time the script is run.