diff options
-rw-r--r-- | services/bookmarkservice.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/bookmarkservice.php b/services/bookmarkservice.php index b5ce452..54c2773 100644 --- a/services/bookmarkservice.php +++ b/services/bookmarkservice.php @@ -370,7 +370,11 @@ class BookmarkService { if (SQL_LAYER == 'mysql4') { $totalquery = 'SELECT FOUND_ROWS() AS total'; } else { - $totalquery = 'SELECT COUNT(DISTINCT bAddress) AS total'. $query_2 . $query_3 . $query_4; + if ($hash) { + $totalquery = 'SELECT COUNT(*) AS total'. $query_2 . $query_3 . $query_4; + } else { + $totalquery = 'SELECT COUNT(DISTINCT bAddress) AS total'. $query_2 . $query_3 . $query_4; + } } if (!($totalresult = & $this->db->sql_query($totalquery)) || (!($row = & $this->db->sql_fetchrow($totalresult)))) { |