I know I can accomplish this in PHP but I really need to have it in one single query for easier pagination. I have 2 tables as follows:
S_MATTERS
id | name
---------------------
0 | Client 1
1 | Client 2
2 | Client 3
S_LINKS
mid | uid
---------------------
2 | 0007
0 | 0007
So I want to
select * from s_matters where id = (select mid from s_links where uid = 0007)
Obviously that is not the right syntax, I just need to get all the client names from the s_matters table where the uid is 0007 on the other table (id on s_matters = mid on s_links).
1 Answer