I have this line in node.js, but i get wrong number of arguments. In redis-cli it would be easy, etg test 10 2, but for some reason it wont work here.
example:
convensation:convensationIds:user:23984 294874 1
my code:
redis_client.zadd(['convensation:convensationIds:user:' + data.from ,convensationId ,data.to]);
error:
RR wrong number of arguments for 'zadd' command
EDIT:
i also tried
redis_client.zadd('convensation:convensationIds:user:' + data.from ,convensationId ,data.to);
but got the same error as above.
You're passing just one argument, namely an array. Try passing the values of that array as proper arguments:
redis_client.zadd('convensation:convensationIds:user:' + data.from ,convensationId ,data.to);
zadd
takes three parameters:
Example: client.zadd("job", 0 , string_job);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.