ShinxQL随机取数?ShinxQL

2023-09-03 14:32:45 作者:靜如·水

在SphinxQL中,如何从索引获取随机记录?

SELECT fname FROM indexname WHERE Age>=21 and Age<=47 random 0,4 G;

出现以下错误:

sphinxql: syntax error, unexpected CONST_INT, expecting BETWEEN (or 8 other tokens) near '0,4
易语言随机取数

是否还有从SphinxQl获取随机记录的其他方法?

推荐答案

您只需

... ORDER BY RAND() LIMIT 4
相关推荐