I want to know is this practically possible in sql(using php as server-side), where in you have an array of values(numbers), and you try to retrieve data based on values inside that array..
I have a sql table:
posts(
id int(11) primary key,
posts varchar(140),
user_id int(11) foreign key
);
I write a query now to retrieve 'posts':
$query="SELECT * FROM posts WHERE user_id=(**Array of select user_id's**)";
Is there any sql in-built function to check values inside an array? or should I be using PHP for this?
I am actually trying to implement the twitter model of showing posts of people whom we follow.