Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ncltours's avatar

Query where, groupby in Redis using Laravel

Hi I have data stored in Redis. I want to query like in Sql like SELECT * FROM TABLE WHERE id = 1;

How Can I accomplish this in Redis database?

0 likes
2 replies
lostdreamer_nl's avatar

redis is not a database , it's a key value store.

So you can get the data that is in key 'user_1_profile' but you cannot get data from it like you suggest select * from 'redis' WHERE key LIKE 'user%' or any other query type.

It's just to put data in and get it again, but by key, like you have a big in memory array for caching your data.

ncltours's avatar

ohh Thanks very much. I was trying to replicate my mysql database table with redis database.

Please or to participate in this conversation.