$query = mysql_query("SELECT * FROM `table` WHERE `id`>0");
// change ID to whatever you use as the index. the id above, ^
while($row=mysql_fetch_array($query)){
$timestamp = strtotime($row[time]);
$cutoff = time()-$timestamp;
$limit = 864000;
if($limit > $cutoff){
$query = mysql_query("UPDATE `table` SET `close`=1 WHERE `id`=$row[id]");
// Of course, the "`close`=1" part would be replaced by whatever you have that represents it being closed.
// Again, the ID would change to whatever your index is.
}
else{
// nothing.
}
}
*** Spaced out so it's easier on the eyes.
I believe that should work, not 100% sure. I'd prefer if someone revises it for me.
but, yeah, try it if you want.