PHPackages                             glukkkk/sphinxql-query-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. glukkkk/sphinxql-query-builder

ActiveLibrary[Database &amp; ORM](/categories/database)

glukkkk/sphinxql-query-builder
==============================

A PHP query builder for SphinxQL. Uses MySQLi to connect to the Sphinx server.

4.0.2(1y ago)05Apache-2.0PHPPHP ^7.1 || ^8

Since Aug 19Pushed 1y agoCompare

[ Source](https://github.com/glukkkk/SphinxQL-Query-Builder)[ Packagist](https://packagist.org/packages/glukkkk/sphinxql-query-builder)[ Docs](http://www.foolz.us)[ RSS](/packages/glukkkk-sphinxql-query-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (43)Used By (0)

Query Builder for SphinxQL
==========================

[](#query-builder-for-sphinxql)

[![Build Status](https://camo.githubusercontent.com/941d98b92151fd9cde9f0fa9b1ebcc98494951ecdae23d7529e3ae94b364e3bd/68747470733a2f2f7472617669732d63692e6f72672f466f6f6c436f64652f537068696e78514c2d51756572792d4275696c6465722e706e67)](https://travis-ci.org/FoolCode/SphinxQL-Query-Builder)[![Latest Stable Version](https://camo.githubusercontent.com/385160c3192b4975946c3a15c8806e00f298d35d1971bc542a65e4642767eba9/68747470733a2f2f706f7365722e707567782e6f72672f666f6f6c7a2f737068696e78716c2d71756572792d6275696c6465722f762f737461626c65)](https://packagist.org/packages/foolz/sphinxql-query-builder)[![Latest Unstable Version](https://camo.githubusercontent.com/1694a475203a164f737281eb17994441c0b4e00aa74bce82d3f84fa53e262955/68747470733a2f2f706f7365722e707567782e6f72672f666f6f6c7a2f737068696e78716c2d71756572792d6275696c6465722f762f756e737461626c65)](https://packagist.org/packages/foolz/sphinxql-query-builder)[![Total Downloads](https://camo.githubusercontent.com/dbbe7512b0ce424a70572b6ab1fb183fbbf6b9bf4838cecd4b7e8642d5c9f347/68747470733a2f2f706f7365722e707567782e6f72672f666f6f6c7a2f737068696e78716c2d71756572792d6275696c6465722f646f776e6c6f616473)](https://packagist.org/packages/foolz/sphinxql-query-builder)

About
-----

[](#about)

This is a SphinxQL Query Builder used to work with SphinxQL, a SQL dialect used with the Sphinx search engine and it's fork Manticore. It maps most of the functions listed in the [SphinxQL reference](http://sphinxsearch.com/docs/current.html#SphinxQL-reference) and is generally [faster](http://sphinxsearch.com/blog/2010/04/25/sphinxapi-vs-SphinxQL-benchmark/) than the available Sphinx API.

This Query Builder has no dependencies except PHP 7.1 or later, `\MySQLi` extension, `PDO`, and [Sphinx](http://sphinxsearch.com)/[Manticore](https://manticoresearch.com).

### Missing methods?

[](#missing-methods)

SphinxQL evolves very fast.

Most of the new functions are static one liners like `SHOW PLUGINS`. We'll avoid trying to keep up with these methods, as they are easy to just call directly (`(new SphinxQL($conn))->query($sql)->execute()`). You're free to submit pull requests to support these methods.

If any feature is unreachable through this library, open a new issue or send a pull request.

Code Quality
------------

[](#code-quality)

The majority of the methods in the package have been unit tested.

The only methods that have not been fully tested are the Helpers, which are mostly simple shorthands for SQL strings.

How to Contribute
-----------------

[](#how-to-contribute)

### Pull Requests

[](#pull-requests)

1. Fork the SphinxQL Query Builder repository
2. Create a new branch for each feature or improvement
3. Submit a pull request from each branch to the **master** branch

It is very important to separate new features or improvements into separate feature branches, and to send a pull request for each branch. This allows me to review and pull in new features or improvements individually.

### Style Guide

[](#style-guide)

All pull requests must adhere to the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) standard.

### Unit Testing

[](#unit-testing)

All pull requests must be accompanied by passing unit tests and complete code coverage. The SphinxQL Query Builder uses `phpunit` for testing.

[Learn about PHPUnit](https://github.com/sebastianbergmann/phpunit/)

Installation
------------

[](#installation)

This is a Composer package. You can install this package with the following command: `composer require foolz/sphinxql-query-builder`

Usage
-----

[](#usage)

The following examples will omit the namespace.

```
