代潇瑞博客

sIsMember 命令/方法/函数

Checks if value is a member of the set stored at the key key.

检查VALUE是否是SET容器中的成员。


Parameters

key value


Return value

BOOL TRUE if value is a member of the set at key key, FALSE otherwise.


Example

$redis->sAdd('key1' , 'member1');

$redis->sAdd('key1' , 'member2');

$redis->sAdd('key1' , 'member3'); /* 'key1' => {'member1', 'member2', 'member3'}*/


$redis->sIsMember('key1', 'member1'); /* TRUE */

$redis->sIsMember('key1', 'memberX'); /* FALSE */

【相关命令】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1