]>
src.bluestatic.org Git - bugdar.git/blob - docs/update_bug_names.php
6 require_once('./global.php');
9 $users = $db->query("SELECT userid, displayname FROM " . TABLE_PREFIX
. "user");
10 while ($user = $db->fetch_array($users))
12 $userlist["$user[userid]"] = $user['displayname'];
15 $bugs = $db->query("SELECT * FROM " . TABLE_PREFIX
. "bug");
16 while ($bug = $db->fetch_array($bugs))
19 UPDATE " . TABLE_PREFIX
. "bug
20 SET username = '" . $db->escape_string($userlist["$bug[userid]"]) . "',
21 lastpostbyname = '" . $db->escape_string($userlist["$bug[lastpostby]"]) . "',
22 hiddenlastpostbyname = '" . $db->escape_string($userlist["$bug[hiddenlastpostby]"]) . "'
23 WHERE bugid = $bug[bugid]