Can somebody please give me something about how to get all categories and all users in this example
hmset category:1 name opera description music year 1573
OK
hmset category:2 name snowsports description sport Tmembers groups
OK
hmset category:3 name java description language year 1995
OK
hmset user:1 name jack age 23 country france
OK
hmset user:2 name john age 25 country Uk
Ok
hmset user:3 name julia age 27 country england
In that example, you'd have to do:
KEYS 'category:*'
KEYS 'user:*'
If you need to run this in production, use the SCAN command instead of keys. Assuming this is in db 0 on your Redis instance:
SCAN 0 match 'category:*'
SCAN 0 match 'user:*'
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