• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • SphinxClient::setGroupDistinct()

    (PECL sphinx >= 0.1.0)

    Set attribute name for per-group distinct values count calculations

    说明

    publicSphinxClient::setGroupDistinct(string $attribute): bool

    Sets attribute name for per-group distinct values count calculations. Only available for grouping queries. For each group, all values of$attributewill be stored, then the amount of distinct values will be calculated and returned to the client. This feature is similar to COUNT(DISTINCT)clause in SQL.

    参数

    $attribute

    A string containing group-by attribute name.

    返回值

    成功时返回TRUE,或者在失败时返回FALSE

    参见

    • SphinxClient::setSortMode
    • SphinxClient::setGroupBy
    • SphinxClient::resetGroupBy