appzz / sphinxql
Mysqli interface to SphinxQL
1.2.0
2020-04-09 08:41 UTC
Requires
- php: >=5.3.3
This package is auto-updated.
Last update: 2024-12-09 18:58:03 UTC
README
Mysqli interface for SphinxQL
//Select query
$db = \AppZz\DB\SphinxQL::factory ('127.0.0.1', 9323)
->select('index', ['id', 'title'])
->match('@field', 'foobar')
->where('field2', '>', 2)
->between('field3', 10, 90);
$result = $db->execute();
if ($result) {
$data = $db->as_array();
var_dump($data);
}
//Update RT index
$update = \AppZz\DB\SphinxQL::factory ('127.0.0.1', 9323)
->replace('index', ['id', 'title'])
->values([11, 'new title'])
->execute();
//affected rows
var_dump($update);