You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the rank of a given member in the specified sorted set, starting at 0 for the item with the smallest score. zRevRank starts at 0 for the item with the *largest* score.
1339
+
##### *Parameters*
1340
+
*key*
1341
+
*member*
1342
+
##### *Return value*
1343
+
*Long*, the item's score.
1344
+
##### *Example*
1345
+
<pre>
1346
+
$redis->delete('z');
1347
+
$redis->zAdd('key', 1, 'one');
1348
+
$redis->zAdd('key', 2, 'two');
1349
+
$redis->zRank('key', 'one'); /* 0 */
1350
+
$redis->zRank('key', 'two'); /* 1 */
1351
+
$redis->zRevRank('key', 'one'); /* 1 */
1352
+
$redis->zRevRank('key', 'two'); /* 0 */
1353
+
</pre>
1354
+
1336
1355
## zIncrBy
1337
1356
##### Description
1338
1357
Increments the score of a member from a sorted set by a given amount.
0 commit comments