Aesop Posted August 10, 2006 Share Posted August 10, 2006 Hi there,So I have some records in my db table that get a time stamp in a format that looks like [b]July 10, 2006, 10:29 am[/b] upon form submission. Every day I have a cron job lined up that will query the table, specifically the fields with the timestamp, and is supposed to update them if they are found to be 30 days older than the time stamp. Below is the snippet that does the work. For some reason, it won't update the record and it spits out no errors either. Pretty much nothing happens. Could it be the format I'm using to do the timestamp?[code=php:0]$timestamp = "SELECT tstamp FROM tblnewaccount";$result = mysql_query($timestamp) or die ("Query failed");if (strtotime("+30 days", $timestamp) > date('U')) { //update the user account if they have gone past 30 days $q = "UPDATE tblnewaccount SET status = 'expired'";[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.