ripaclub / sphinxsearch

Sphinx Search library provides SphinxQL indexing and searching features
BSD 2-Clause "Simplified" License
62 stars 10 forks source link

Having clause #4

Closed leodido closed 10 years ago

leodido commented 10 years ago

Syntax produced by library seems ok, but with HAVING queries a

"Statement could not be executed"

error is thrown always.

I.e.,

SELECT * FROM `foo` HAVING c1 = 5;
Statement could not be executed
(42000 - 1064 - sphinxql: syntax error, unexpected IDENT, expecting $end near 'HAVING x = 5')

Version installed: 2.1.4-release (rel21-r4421)

leodido commented 10 years ago

HAVING clause requires GROUP BY clause.

It is supported starting from SphinxSearch 2.2.1-beta (changelog).