diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 22:15:58 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 22:15:58 +1000 |
| commit | a7d4a5c3c86ab9529104944d79233c8dab20e5eb (patch) | |
| tree | bae13c6056a990739aeda79b3495a6cf29bdc8fb /inc/mod/pages.php | |
| parent | b105a17b4f47931f9d5b7f41d181246e328280ba (diff) | |
pagination bug for user logs
Diffstat (limited to 'inc/mod/pages.php')
| -rw-r--r-- | inc/mod/pages.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php index b167cb69..d3900130 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -432,7 +432,8 @@ function mod_user_log($username, $page_no = 1) { if (empty($logs) && $page_no > 1) error($config['error']['404']); - $query = prepare("SELECT COUNT(*) FROM `modlogs`"); + $query = prepare("SELECT COUNT(*) FROM `modlogs` LEFT JOIN `mods` ON `mod` = `mods`.`id` WHERE `username` = :username"); + $query->bindValue(':username', $username); $query->execute() or error(db_error($query)); $count = $query->fetchColumn(0); |
