Jump to content


This topic is now archived and is closed to further replies.


strtotime issue?

Recommended Posts

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?

$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'";

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.