redis_zcard()

Read(268) Label: sorted set, key,

Description:

Get the number of members in a sorted set.

Syntax:

redis_zcard(con,key)

Note:

External library function. If the parameter key is supplied and the data type of its value is the sorted set, return the number of members in the sorted set.If the parameter key isn’t supplied, return 0.

Parameters:

con

Database connection string

key

Sorted set name

Return value:

Integer

Example:

 

A

 

1

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

 

 2

=redis_zcard(A1,"salary")