I saw a Redis tutorial. For my case there is a function: ZREVRANGEBYSCORE But I dont understand how get last one data via this function.
I tried ZREVRANGEBYSCORE myzset 0 1
for get last data row
Assuming "last data" means the item with the largest score, use the ZREVRANGEBYSCORE
command in the following manner:
ZREVRANGEBYSCORE <key> +inf -inf LIMIT 0 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With