多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## hSetNx ##### *Description* Adds a value to the hash stored at key only if this field isn't already in the hash. 添加一个VALUE到HASH STORE中,如果FIELD不存在。 ##### *Return value* *BOOL*`<span class="calibre12">TRUE</span>` if the field was set, `<span class="calibre12">FALSE</span>` if it was already present. ##### *Example* ``` <pre class="calibre16">$redis->delete('h') $redis->hSetNx('h', 'key1', 'hello'); /* TRUE, 'key1' => 'hello' in the hash at "h" */ $redis->hSetNx('h', 'key1', 'world'); /* FALSE, 'key1' => 'hello' in the hash at "h". No change since the field wasn't replaced. */ ``` ##