diff options
author | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2010-07-23 12:29:32 +0400 |
---|---|---|
committer | Nicolas Favre-Felix <n.favrefelix@gmail.com> | 2010-07-23 12:29:32 +0400 |
commit | 049727f3e637aece542a6a19ea0f8fdb4c5ee399 (patch) | |
tree | e86f893b1630a101b263578968e079c3aed67ef3 /README.markdown | |
parent | 6d6b1339e8d435fa2184d90d8d2d6c33e7749e48 (diff) |
Added ZCOUNT + tests & docs.
Diffstat (limited to 'README.markdown')
-rw-r--r-- | README.markdown | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index a0ddb13a..dc3e203c 100644 --- a/README.markdown +++ b/README.markdown @@ -1284,6 +1284,24 @@ $redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1)); /* array('val2 $redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE, 'limit' => array(1, 1)); /* array('val2' => 2) */ </pre> +## zCount +##### *Description* +Returns the *number* of elements of the sorted set stored at the specified key which have scores in the range [start,end]. +##### *Parameters* +*key* +*start*: double +*end*: double + +##### *Return value* +*LONG* the size of a corresponding zRangeByScore. +##### *Example* +<pre> +$redis->zAdd('key', 0, 'val0'); +$redis->zAdd('key', 2, 'val2'); +$redis->zAdd('key', 10, 'val10'); +$redis->zCount('key', 0, 3); /* 2, corresponding to array('val0', 'val2') */ +</pre> + ## zDeleteRangeByScore, zRemoveRangeByScore ##### *Description* Deletes the elements of the sorted set stored at the specified key which have scores in the range [start,end]. |