mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 08:20:11 +01:00
added "total_found" info from SHOW META stats
This commit is contained in:
parent
8d71cdc9aa
commit
56d046a781
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user