PHP code example of ekiwok / sphinxbundle
1. Go to this page and download the library: Download ekiwok/sphinxbundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ekiwok / sphinxbundle example snippets
$sphinx = $this->get('sphinx');
$conn = $sphinx->getConnection();
$recipes = $conn->query('SELECT id, title FROM recipes WHERE MATCH("(@title chicken)")');
// $sphinxClient is instance of Sphinx\SphinxClient
$sphinxStats = $this->get('sphinx_stats');
$sphinxClient = new \Ekiwok\SphinxBundle\Sphinx\SphinxDataCollector($sphinxClient, $sphinxStats);