I feel like I am messing with Mother Nature with this time function. But really just wanting to record it and use it.. If I store the result autotimer using the following format in my database $now = time(); $now2 = date("F j, Y",$now); $now2.=" 00:01:00"; $autotimer = strtotime("$now2"); Code (markup): Then later grab that result and compare using this query $media_query = "select * from bigfile"; $result1 = mysql_query($result1_query); if(mysql_num_rows($result1)) { while($row = mysql_fetch_array($result1)) { $autotimer= $row['autotimer']; if($autotimer< strtotime("-8 hours")) @include("runme.php"); Code (markup): Did I do this right to produce the result of calling the runme.php if 8 hours had elapsed? Where step one would be performed again as part of the runme routine. Hopefully running every 8 hours.... Thanks so much just for looking. and any fix you might offer.... if it's needed. Jim
I don't quite understand machine time but have been working on most of the day , writing all the supporting code. But, looking at the first part to record time I am wondering if that is going to just be flat wrong. Should it just be = to now ? $now = time(); $autotimer = strtotime("$now"); Code (markup):
I have something working now.. been painful that's ok Now I am storing time in database field using this code $autotimer = time(); Code (markup): then later I use that to make comparsion for if query using this format $auto_acttime = $row['autotimer']; if($auto_acttime < strtotime("-8 hour")) @include("runme.php"); Code (markup): Now several test show this to work but is just by serendipity that it has. So now question is this this. Will this produce the same (accurate) result in both mysql 4 and the newer 5 where time can evidently be different. Just looking towards future... thanks for any replies.