Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMSET #31

Closed
magalvao opened this issue Feb 22, 2015 · 2 comments
Closed

HMSET #31

magalvao opened this issue Feb 22, 2015 · 2 comments

Comments

@magalvao
Copy link

How do I use HMSET with redisent?
I'm trying:

$array= array("IP", $IP, "ROOMNAME", $room);
$redis->hmset("new_room", $array);

But I'm receiving an error:

PHP Fatal error:  Uncaught exception 'redisent\\RedisException' with message 'Protocol error: invalid bulk length' (...)
@jdp
Copy link
Owner

jdp commented Feb 22, 2015

@magalvao All redis command arguments are arguments to the method. This should work for you:

$redis->hmset("new_room", "IP", $IP, "ROOMNAME", $room);

@magalvao
Copy link
Author

Now I understand. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants