]>
src.bluestatic.org Git - bugdar.git/blob - docs/update_bug_table_cache.php
4 require_once('./global.php');
6 $comments = $db->query("SELECT * FROM comment ORDER BY bugid, dateline ASC");
8 while ($comment = $db->fetch_array($comments))
10 if (!isset($replace["$comment[bugid]"]))
12 $replace["$comment[bugid]"] = array('initialreport' => $comment['commentid'], 'dateline' => $comment['dateline'], 'lastposttime' => $comment['dateline'], 'lastpostby' => $comment['userid']);
14 $replace["$comment[bugid]"]['lastposttime'] = $comment['dateline'];
17 foreach ($replace AS $bugid => $newfields)
19 $db->query("UPDATE bug SET initialreport = $newfields[initialreport], dateline = $newfields[dateline], lastposttime = $newfields[lastposttime], lastpostby = $newfields[lastpostby] WHERE bugid = $bugid");
20 echo "<p
>Updated
$bugid</p
>";