Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Favre-Felix <n.favrefelix@gmail.com>2010-07-23 12:29:32 +0400
committerNicolas Favre-Felix <n.favrefelix@gmail.com>2010-07-23 12:29:32 +0400
commit049727f3e637aece542a6a19ea0f8fdb4c5ee399 (patch)
treee86f893b1630a101b263578968e079c3aed67ef3 /README.markdown
parent6d6b1339e8d435fa2184d90d8d2d6c33e7749e48 (diff)
Added ZCOUNT + tests & docs.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown18
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].