Question

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);
Était-ce utile?

La solution

Have you tried simply using zincrby:

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top