From dce4f29bcde7e16b7ccf79bc14b291a14fee8a2d Mon Sep 17 00:00:00 2001 From: SJ Date: Wed, 25 Dec 2013 16:26:09 +0100 Subject: [PATCH] show meta query fix --- webui/system/database/sphinx.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webui/system/database/sphinx.php b/webui/system/database/sphinx.php index 7e4b7ad7..3beeee98 100644 --- a/webui/system/database/sphinx.php +++ b/webui/system/database/sphinx.php @@ -63,10 +63,12 @@ class Sphinx { $query->exec_time = $time_end - $time_start; - $meta = $this->link->prepare("show meta like 'total_found'"); + $meta = $this->link->prepare("show meta"); $meta->execute(); - $R = $meta->fetch(); - if(isset($R[1])) { $query->total_found = $R[1]; } + $R = $meta->fetchAll(); + while(list ($k, $v) = each($R)){ + if($v[0] == "total_found") { $query->total_found = $v[1]; break; } + } return $query; }