]>
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 foreach ($users as $user)
12 $userlist["$user[userid]"] = $user['displayname'];
15 $bugs = $db->query("SELECT * FROM " . TABLE_PREFIX
. "bug");
16 foreach ($bugs as $bug)
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]