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_open()

 

2

=redis_zrangebyscore(A1,"salary",0,3000,"WITHSCORES")

3

=redis_zcount(A1,"salary",1000.0,11000.0)

4

=redis_zcount(A1,"salary",1000.0,12000.0)