From 56d046a7817c821169d520526e8c60a1325e733c Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 17 Dec 2013 15:26:43 +0100 Subject: [PATCH] added "total_found" info from SHOW META stats --- webui/system/database/sphinx.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webui/system/database/sphinx.php b/webui/system/database/sphinx.php index 63d0e46d..7e4b7ad7 100644 --- a/webui/system/database/sphinx.php +++ b/webui/system/database/sphinx.php @@ -29,6 +29,7 @@ class Sphinx { $query->error = 1; $query->errmsg = "Error"; $query->query = $sql; + $query->total_found = 0; $time_start = microtime(true); @@ -62,6 +63,11 @@ class Sphinx { $query->exec_time = $time_end - $time_start; + $meta = $this->link->prepare("show meta like 'total_found'"); + $meta->execute(); + $R = $meta->fetch(); + if(isset($R[1])) { $query->total_found = $R[1]; } + return $query; }