<? $qd = query("SELECT * FROM `jurnal_system` WHERE `read` = '1' and `time` < ".(time() - 60*60*24*30)); while ($p_del = mysql_fetch_array($qd)) { query("DELETE FROM `jurnal_system` WHERE `id` = '{$p_del[id]}'"); }