I'm trying to get a list of 'contacts' for a specified user id. Let says my user id is 1, i need to get the list of ids of my my contacts from chat-contactlist then get all the infos for each id.
All users' id, name and contact information
Table usr: uid, rname, phonenumber
Online status and other stuff
Table chat-usr: uid, nickname, online_status
Containing user id and the user id of each contact this user have :
Table chat-contactlist: uid, cid (cid = The id of the person who's int he "uid" user list
So I need the name, the nickname, the online_status for all the 'cid' for a specified 'uid'... Dont know i read a tutorial about left join but it seams complex to merge multiple tables, anyone wanna try? Any recommendation?
Thank you
EDIT
Changing name by rname because name is a reserved word for SQL.