Let's say I have a subscribers table that has a row for each user like this.
id name subscribers 1 user1 user2,user3,user4 2 user2 user4,user5,user3 3 user3 user1,user6,user2 etc...
What I want to do is run a select statement like this.
SELECT subscribers from table where id = '1'
.. And then, limit the number of subscribers to show me ie if I limited it to 2, it would only mean SELECT "user2,user3" from table.subscribers WHERE id=1
I know that I can limit it after selecting everything with PHP, but I do not want to run into performance issues if there are millions of usernames in each column ...
It is also the best framework for setting up a subscibe/follow . Or is there a better way?
source share