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

快捷菜单 返回顶部

php操作redis

返回上层

zSet数据类型函数 - zRemRangeByScore, zDeleteRangeByScore - 命令/方法/函数

Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end].

移除key对应的有序集合中scroe位于min和max(包含端点)之间的所哟元素。从2.1.6版本后开始,区间端点min和max可以被排除在外,这和ZRANGEBYSCORE的语法一样。


Parameters

key

start: double or "+inf" or "-inf" string

end: double or "+inf" or "-inf" string


Return value

LONG The number of values deleted from the sorted set


Example

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

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

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

$redis->zRemRangeByScore('key', 0, 3); /* 2 */


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

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

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

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