使用SphinxQl时,在执行此查询时,我将得到以下错误
select fieldname from indexname where height >= 165.25 and height <= 175.25 OR Age >=51;
ERROR 1064 (42000): sphinxql: syntax error, unexpected OR, expecting $end near 'OR Age >=51' select fieldname from indexname where (height >= 165.25 and height <= 175.25) OR Age >=51;
ERROR 1064 (42000): sphinxql: only >=, <=, and BETWEEN floating-point filter types are supported in this version near '(height >= 165.25 and height <= 175.25) OR Age >=51'提前谢谢,请建议
发布于 2013-03-05 13:09:50
试着做些像
SELECT fieldname, IF( (height >= 165.25 AND height <= 175.25) OR Age >=51, 1, 0)
AS myfilter FROM indexname WHERE myfilter = 1狮身人面像可以做“OR”,他们只是不能在WHERE子句本身。
https://stackoverflow.com/questions/15199352
复制相似问题