在线工具
网站地图    收藏    合作   
<

快捷菜单 返回顶部

php操作redis

返回上层

zSet数据类型函数 - zCount - 命令/方法/函数

Returns the number of elements of the sorted set stored at the specified key which have scores in the range [start,end]. Adding a parenthesis before start or end excludes it from the range. +inf and -inf are also valid limits.

返回key对应的有序集合中介于min和max间的元素的个数。


Parameters

key

start: string

end: string


Return value

LONG the size of a corresponding zRangeByScore.


Example

$redis->zAdd('key', 0, 'val0');

$redis->zAdd('key', 2, 'val2');

$redis->zAdd('key', 10, 'val10');

$redis->zCount('key', 0, 3); /* 2, corresponding to array('val0', 'val2') */


来源:https://www.daixiaorui.com/

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com