hset php,hSet 命令/方法/函数
Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned.
添加一個(gè)VALUE到HASH中。如果VALUE已經(jīng)存在于HASH中,則返回FALSE。
Parameters
key
hashKey
value
Return value
LONG 1 if value didn't exist and was added successfully, 0 if the value was already present and was replaced, FALSE if there was an error.
Example
$redis->delete('h')
$redis->hSet('h', 'key1', 'hello'); /* 1, 'key1' => 'hello' in the hash at "h" */
$redis->hGet('h', 'key1'); /* returns "hello" */
$redis->hSet('h', 'key1', 'plop'); /* 0, value was replaced. */
$redis->hGet('h', 'key1'); /* returns "plop" */
總結(jié)
以上是生活随笔為你收集整理的hset php,hSet 命令/方法/函数的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 什么标准规定了aes加密_Python
- 下一篇: sap 标准委外和工序委外_SAP FI