Maarten
Maarten

Reputation: 4671

How to use ZINCRBY with predis

I'm using Predis to connect to a Reddis server, and am trying to use ZINCRBY. The rawcommand is apparently not supported anymore, and I can't get the following to work:

$cmdSet = $redis->createCommand('ZINCRBY');
$foo = array($stemwijzerid, $answernumber.'-'.$answer);
$cmdSet->setArguments($foo);
$cmdSetReply = $redis->executeCommand($cmdSet);

Upvotes: 1

Views: 692

Answers (1)

Tobias P.
Tobias P.

Reputation: 4664

Have you tried simply using zincrby:

$redis->zincrby('myzset', 2. "one")

Upvotes: 1

Related Questions