From ba24685bf242d4461bd0f6ceb49b6bfafe664868 Mon Sep 17 00:00:00 2001 From: ftwbzhao Date: Wed, 13 May 2015 16:38:32 +0800 Subject: [PATCH] update INCR && DECR --- README.markdown | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 446133e697..3dec9f29f7 100644 --- a/README.markdown +++ b/README.markdown @@ -798,7 +798,11 @@ $redis->incr('key1'); /* key1 didn't exists, set to 0 before the increment */ $redis->incr('key1'); /* 2 */ $redis->incr('key1'); /* 3 */ $redis->incr('key1'); /* 4 */ -$redis->incrBy('key1', 10); /* 14 */ + +// Will redirect, and actually make an INCRBY call +$redis->incr('key1', 10); /* 14 */ + +$redis->incrBy('key1', 10); /* 24 */ ~~~ ### incrByFloat @@ -840,7 +844,11 @@ $redis->decr('key1'); /* key1 didn't exists, set to 0 before the increment */ $redis->decr('key1'); /* -2 */ $redis->decr('key1'); /* -3 */ -$redis->decrBy('key1', 10); /* -13 */ + +// Will redirect, and actually make an DECRBY call +$redis->decr('key1', 10); /* -13 */ + +$redis->decrBy('key1', 10); /* -23 */ ~~~ ### mGet, getMultiple