NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
## sAdd ##### *Description* Adds a value to the set value stored at key. If this value is already in the set, `<span class="calibre12">FALSE</span>` is returned. 添加一个VALUE到SET容器中,如果这个VALUE已经存在于SET中,那么返回FLASE。 ##### *Parameters* *key* *value* ##### *Return value* *BOOL*`<span class="calibre12">TRUE</span>` if value didn't exist and was added successfully, `<span class="calibre12">FALSE</span>` if the value is already present. 如果VALUE不存在于SET中,那么ADDED成功,返回TRUE,负责返回FALSE。 ##### *Example* ``` <pre class="calibre9">$redis->sAdd('key1' , 'member1'); /* TRUE, 'key1' => {'member1'} */ $redis->sAdd('key1' , 'member2'); /* TRUE, 'key1' => {'member1', 'member2'}*/ $redis->sAdd('key1' , 'member2'); /* FALSE, 'key1' => {'member1', 'member2'}*/ ```