企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 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'}*/ ```