hset php,hSet 命令/方法/函数
生活随笔
收集整理的這篇文章主要介紹了
hset php,hSet 命令/方法/函数
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Adds a value to the hash stored at key. If this value is already in the hash, FALSE is returned.
添加一個VALUE到HASH中。如果VALUE已經存在于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" */
總結
以上是生活随笔為你收集整理的hset php,hSet 命令/方法/函数的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 什么标准规定了aes加密_Python
- 下一篇: amcl说明