Redis Zcount 命令

更新时间: 2019-07-07 15:54

Redis Zcount 命令用于计算有序集合中指定分数区间的成员数量。

语法

redis 127.0.0.1:6379> ZCOUNT key min max

返回值

分数值在 min 和 max 之间的成员的数量。

实例

redis 127.0.0.1:6379> ZADD myzset 1 "hello"
(integer) 1
redis 127.0.0.1:6379> ZADD myzset 1 "foo"
(integer) 1
redis 127.0.0.1:6379> ZADD myzset 2 "world" 3 "bar"
(integer) 2
redis 127.0.0.1:6379> ZCOUNT myzset 1 3
(integer) 4

查看更多 Redis 有序集合(sorted set)命令

Mobilizing Web Sites

Mobilizing Web Sites

Layon, Kristofer / 2011-12 / 266.00元

Everyone has been talking about the mobile web in recent years, and more of us are browsing the web on smartphones and similar devices than ever before. But most of what we are viewing has not yet bee......一起来看看 《Mobilizing Web Sites》 这本书的介绍吧!

JS 压缩/解压工具

JS 压缩/解压工具

在线压缩/解压 JS 代码

Base64 编码/解码

Base64 编码/解码

Base64 编码/解码