aboutsummaryrefslogtreecommitdiff
path: root/services/searchhistoryservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'services/searchhistoryservice.php')
-rw-r--r--services/searchhistoryservice.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/searchhistoryservice.php b/services/searchhistoryservice.php
index 72ea825..91457e8 100644
--- a/services/searchhistoryservice.php
+++ b/services/searchhistoryservice.php
@@ -72,16 +72,17 @@ class SearchHistoryService {
while ($row = & $this->db->sql_fetchrow($dbresult)) {
$searches[] = $row;
}
+ $this->db->sql_freeresult($dbresult);
return $searches;
}
function countSearches() {
$sql = 'SELECT COUNT(*) AS `total` FROM '. $this->getTableName();
- if (!($result = & $this->db->sql_query($sql)) || (!($row = & $this->db->sql_fetchrow($result)))) {
+ if (!($dbresult = & $this->db->sql_query($sql)) || (!($row = & $this->db->sql_fetchrow($dbresult)))) {
message_die(GENERAL_ERROR, 'Could not get total searches', '', __LINE__, __FILE__, $sql, $this->db);
return false;
}
-
+ $this->db->sql_freeresult($dbresult);
return $row['total'];
}