fixed table prefix at manage page

This commit is contained in:
printempw 2016-03-27 15:01:17 +08:00
parent 005f5335ad
commit e1d44e9adf

View File

@ -32,11 +32,11 @@
$db = new Database\Database();
if (isset($_POST['search-username'])) {
$result = $db->query("SELECT * FROM users WHERE `username` LIKE '%".$_POST['search-username']."%' ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30");
$page_total = round($db->query("SELECT * FROM users WHERE `username` LIKE '%".$_POST['search-username']."%'")->num_rows/30);
$result = $db->query("SELECT * FROM ".DB_PREFIX."users WHERE `username` LIKE '%".$_POST['search-username']."%' ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30");
$page_total = round($db->query("SELECT * FROM ".DB_PREFIX."users WHERE `username` LIKE '%".$_POST['search-username']."%'")->num_rows/30);
} else {
$result = $db->query("SELECT * FROM users ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30");
$page_total = round($db->query("SELECT * FROM users WHERE 1")->num_rows/30);
$result = $db->query("SELECT * FROM ".DB_PREFIX."users ORDER BY `uid` LIMIT ".(string)(($page_now-1)*30).", 30");
$page_total = round($db->query("SELECT * FROM ".DB_PREFIX."users WHERE 1")->num_rows/30);
}
while ($row = $result->fetch_array()) { ?>