mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
fixed rounding of page number
This commit is contained in:
parent
e4a30c149c
commit
005f5335ad
@ -33,10 +33,10 @@
|
||||
|
||||
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 = $db->query("SELECT * FROM users WHERE `username` LIKE '%".$_POST['search-username']."%'")->num_rows/30;
|
||||
$page_total = round($db->query("SELECT * FROM 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 = $db->query("SELECT * FROM users WHERE 1")->num_rows/30;
|
||||
$page_total = round($db->query("SELECT * FROM users WHERE 1")->num_rows/30);
|
||||
}
|
||||
|
||||
while ($row = $result->fetch_array()) { ?>
|
||||
|
Loading…
Reference in New Issue
Block a user