aboutsummaryrefslogtreecommitdiff
path: root/services/searchhistoryservice.php
diff options
context:
space:
mode:
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-03 15:32:23 +0000
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-02-03 15:32:23 +0000
commitc0e46287e41ac5be4c4832c915c8e2ba78b9a1d5 (patch)
tree98aef584a8d4b91c5a618bbbfa11953cba4ad9c2 /services/searchhistoryservice.php
parent4aaef1823e5e37f02bc18078ccb67217b8cdbcb7 (diff)
downloadsemanticscuttle-c0e46287e41ac5be4c4832c915c8e2ba78b9a1d5.tar.gz
semanticscuttle-c0e46287e41ac5be4c4832c915c8e2ba78b9a1d5.tar.bz2
Refactoring: free few sql results
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@247 b3834d28-1941-0410-a4f8-b48e95affb8f
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'];
}