3

I have a problem with using $predis->hmset(). What parameters i need use? I try many variants, but without success.

$this->client()->hmset( $this->name, array( 1 => 3 ))

$this->client()->hmset( $this->name, array( 1, 3 ))
j0k
  • 22,600
  • 28
  • 79
  • 90
aieven
  • 1,939
  • 3
  • 14
  • 8

1 Answers1

11

From the predis examples:

// Prepare an hash with some fields and their respective values.
$client->hmset('metavars', array('foo' => 'bar', 'hoge' => 'piyo', 'lol' => 'wut'));

Perhaps, make sure you use strings and not integers ...

Didier Spezia
  • 70,911
  • 12
  • 189
  • 154