-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Hello,
I am trying to make a query and then get the "total_found" by executing "SHOW META" query.
$conn = new Connection();
$conn->setParams(array('host' => 'localhost', 'port' => 9306));
$cl = new SphinxQL($conn);
$cl->select();
$cl->from("frtIndex");
$cl->limit($pageIndex, 5);
$tipler = array(
"1",
"4",
"3",
);
if(in_array($_GET['t'], $tipler)) {
$cl->where("tip_id", "=", $_GET['t']);
}
$q = strtolower(trim($_GET['q']));
$cl->match(array("name", "detail"), $q);
$cl->enqueue((new SphinxQL($conn))->query('SHOW META'));
//$cl->enqueue((new Helper($conn))->showMeta());
$cl->compileSelect();
$sql = $cl->getCompiled();
print_r($sql);
$result = $cl->executeBatch();
$res1 = $result->getNext();
$res2 = $result->getNext();
print_r($res1);
print_r($res2);
The res2 is empty. I can only get the res1 (which has the select query results in it).
Any idea?
Metadata
Metadata
Assignees
Labels
No labels