show meta query fix

This commit is contained in:
SJ 2013-12-25 16:26:09 +01:00
parent 8aa7508dab
commit dce4f29bcd

View File

@ -63,10 +63,12 @@ class Sphinx {
$query->exec_time = $time_end - $time_start; $query->exec_time = $time_end - $time_start;
$meta = $this->link->prepare("show meta like 'total_found'"); $meta = $this->link->prepare("show meta");
$meta->execute(); $meta->execute();
$R = $meta->fetch(); $R = $meta->fetchAll();
if(isset($R[1])) { $query->total_found = $R[1]; } while(list ($k, $v) = each($R)){
if($v[0] == "total_found") { $query->total_found = $v[1]; break; }
}
return $query; return $query;
} }