Jump to content


Photo

strtotime issue?


  • Please log in to reply
No replies to this topic

#1 Aesop

Aesop
  • Members
  • PipPip
  • Member
  • 10 posts
  • LocationPortland Oregon

Posted 10 August 2006 - 11:34 PM

Hi there,

So I have some records in my db table that get a time stamp in a format that looks like July 10, 2006, 10:29 am 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'";





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users