Joh*_*aul 0 python redis redis-py
我hash在 python 中创建了一个in redis,如下所示:
r.hmset('list:123', {'name': 'john', 'count': 5})
Run Code Online (Sandbox Code Playgroud)
如何增加键的计数值list:123?
小智 10
hash = 'list:123'
key = 'count'
n = 1
r.hincrby(hash, key, n)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2197 次 |
| 最近记录: |