Bug fix: correct counting result for history page

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@78 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
mensonge 2008-03-13 10:11:26 +00:00
parent 9de80c6d84
commit 7884e0e33b

View file

@ -369,9 +369,13 @@ class BookmarkService {
if (SQL_LAYER == 'mysql4') { if (SQL_LAYER == 'mysql4') {
$totalquery = 'SELECT FOUND_ROWS() AS total'; $totalquery = 'SELECT FOUND_ROWS() AS total';
} else {
if ($hash) {
$totalquery = 'SELECT COUNT(*) AS total'. $query_2 . $query_3 . $query_4;
} else { } else {
$totalquery = 'SELECT COUNT(DISTINCT bAddress) AS total'. $query_2 . $query_3 . $query_4; $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)))) { if (!($totalresult = & $this->db->sql_query($totalquery)) || (!($row = & $this->db->sql_fetchrow($totalresult)))) {
message_die(GENERAL_ERROR, 'Could not get total bookmarks', '', __LINE__, __FILE__, $totalquery, $this->db); message_die(GENERAL_ERROR, 'Could not get total bookmarks', '', __LINE__, __FILE__, $totalquery, $this->db);