I have a table "user_connections"
id | uid1 | uid2 1 | 1 | 2 2 | 3 | 1 etc
So, if the current user has uid = 1, then according to my table, he is "connected" to use 2 and 3. So I just want to be able to do something like:
select uid1 from user_connections where uid2 = :currentUserUid
Then pass these uids as a parameter to the view. So that it is ultimately used as a "where in" condition.
Any ideas how to do this? Or what is the best way?