代潇瑞博客

hIncrBy 命令/方法/函数

Increments the value of a member from a hash by a given amount.

根据HASH表的KEY,为KEY对应的VALUE自增参数VALUE。


Parameters

key

member

value: (integer) value that will be added to the member's value


Return value

LONG the new value


Examples

$redis->delete('h');

$redis->hIncrBy('h', 'x', 2); /* returns 2: h[x] = 2 now. */

$redis->hIncrBy('h', 'x', 1); /* h[x] ← 2 + 1. Returns 3 */

【相关命令】

触屏版 | 电脑版

Copyright © 2013 代潇瑞博客手机版

QQ: 446673330

粤ICP备13071969号-1