php - Redis error ERR wrong number of arguments for 'hmset' -


i'm using yiisoft/yii2-redis yii2 component interact redis , it's working charm when comes retrieving data keep getting following error i'm trying use set commands!

redis error: err wrong number of arguments 'hmset' command redis command was: hmset userapi:57d120d1d13f4a3e4d1e2217 ratelimit 10 allowance 9 allowance_updated_at 1478594580  redis error: err wrong number of arguments 'set' command redis command was: set x 10 

my code simply:

$redis = yii::$app->redis; $redis->hmset('userapi:57d120d1d13f4a3e4d1e2217 ratelimit 10 allowance 9 allowance_updated_at 1478594580'); $redis->set('x 10'); 

noting when copy of these commands , paste redis-cli works!

is there clues i'm missing something?! in advance.

oops! fault found redis command params should passed arguments command function follows:

$redis->hmset('userapi:57d120d1d13f4a3e4d1e2217', 'ratelimit', '10', 'allowance', '9', 'allowance_updated_at', '1478594580'); $redis->set('x', '10'); 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -