redis_zcount()

Description:

Count the number of members in a sorted set with scores between a given interval.

Syntax:

redis_zcount(con,key,min,max)

Note:

External library function. By default members whose scores are equal to the parameter min or parameter max are included.

Parameters:

con

Database connection string

key

Sorted set name

min

The starting score

max

The ending score

Return value:

Integer

Example:

 

A

 

1

=redis("192.168.18.131:6379","runqian")

 

2

=redis_zrangebyscore(A1,"salary","-inf","+inf","WITHSCORES")

3

=redis_zcount(A1,"salary",1000,11000)

4

=redis_zcount(A1,"salary",1000,12000)