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-03-17 20:25:10 +0300
committerNicolas Favre-Felix <n.favrefelix@gmail.com>2010-03-17 20:25:10 +0300
commitddd08bfadd5683061fa2df20b2f8515ab5ad60ed (patch)
tree9a33965a7ddbc1173e314ddb243e42ad12bb290e /README.markdown
parentfd8496a0f21a59c6ea545fb1945e505a8d00fdde (diff)
Added doc for new ZRANGEBYSCORE options.
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 5f41f961..a30469ad 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1220,7 +1220,9 @@ Returns the elements of the sorted set stored at the specified key which have sc
*key*
*start*: double
*end*: double
+*options*: array
+Two options are available: `withscores => TRUE`, and `limit => array($offset, $count)`
##### *Return value*
*Array* containing the values in specified range.
##### *Example*
@@ -1229,6 +1231,10 @@ $redis->zAdd('key', 0, 'val0');
$redis->zAdd('key', 2, 'val2');
$redis->zAdd('key', 10, 'val10');
$redis->zRangeByScore('key', 0, 3); /* array('val0', 'val2') */
+$redis->zRangeByScore('key', 0, 3, array('withscores' => TRUE); /* array('val0' => 0, 'val2' => 2) */
+$redis->zRangeByScore('key', 0, 3, array('limit' => array(1, 1)); /* array('val2' => 2) */
+$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>
## zDeleteRangeByScore, zRemoveRangeByScore