Jump to content

strtotime issue?


Aesop

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?


[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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.