redis_sdiff()

Read(281) Label: set, difference,

Description:

Get members of the difference set of all the given sets.

Syntax:

redis_sdiff(con,key[,key1,key2,...])

Note:

This external library function allows multiple sets represented by parameter keys; a nonexistent key is treated as an empty set.

Parameters:

con

Database connection string

key

Set name

Return value:

A list of all members in the difference set.

Example:

 

A

 

1

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

 

2

=redis_srandmember(A1,"fruit",5)

3

=redis_srandmember(A1,"tool",5)

4

=redis_sdiff(A1,"fruit","tool")

5

=redis_sdiff(A1,"tool","fruit")