Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix docs for SADD and SREM

Thanks @summerwind for reporting this issue.
Fixes Pull Request #232.
  • Loading branch information...
commit 1416d8743d0b8f84a6a464af0ae55e1101353764 1 parent 61a6e0d
@nicolasff nicolasff authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 README.markdown
View
12 README.markdown
@@ -792,12 +792,12 @@ Adds a value to the set value stored at key. If this value is already in the set
*value*
##### *Return value*
-*BOOL* `TRUE` if value didn't exist and was added successfully, `FALSE` if the value is already present.
+*LONG* the number of elements added to the set.
##### *Example*
<pre>
-$redis->sAdd('key1' , 'member1'); /* TRUE, 'key1' => {'member1'} */
-$redis->sAdd('key1' , 'member2'); /* TRUE, 'key1' => {'member1', 'member2'}*/
-$redis->sAdd('key1' , 'member2'); /* FALSE, 'key1' => {'member1', 'member2'}*/
+$redis->sAdd('key1' , 'member1'); /* 1, 'key1' => {'member1'} */
+$redis->sAdd('key1' , 'member2', 'member3'); /* 2, 'key1' => {'member1', 'member2', 'member3'}*/
+$redis->sAdd('key1' , 'member2'); /* 0, 'key1' => {'member1', 'member2', 'member3'}*/
</pre>
## sRem, sRemove
@@ -807,13 +807,13 @@ Removes the specified member from the set value stored at key.
*key*
*member*
##### *Return value*
-*BOOL* `TRUE` if the member was present in the set, `FALSE` if it didn't.
+*LONG* The number of elements removed from the set.
##### *Example*
<pre>
$redis->sAdd('key1' , 'member1');
$redis->sAdd('key1' , 'member2');
$redis->sAdd('key1' , 'member3'); /* 'key1' => {'member1', 'member2', 'member3'}*/
-$redis->sRem('key1', 'member2'); /* 'key1' => {'member1', 'member3'} */
+$redis->sRem('key1', 'member2', 'member3'); /*return 2. 'key1' => {'member1'} */
</pre>
## sMove

0 comments on commit 1416d87

Please sign in to comment.
Something went wrong with that request. Please try again.