takn25 Posted April 23, 2011 Share Posted April 23, 2011 Hi, I have a table for the users detail in the database which stores their avatar and stuff. There is another called part, this is where the users unique ID from the users table is posted, so I can join these both tables and retrieve the data accordingly. The user table has a few rows for avatars for example avatar_1 , avatar_2 and avatar_3 these rows have paths to different avatars. The problem I am facing is the user table is looking really ugly :-\ thanks to these extra avatar rows. What I want to achieve is create a different table for avatars to store these 3 rows but I was wondering how will I join 3 of these tables the user table, the part table and finally the avatar table or should I do something else? Thanks any help is appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/234495-joining-3-tables-or/ Share on other sites More sharing options...
malinens Posted April 23, 2011 Share Posted April 23, 2011 create third table for avatars (user_id, avatar_type, avatar_value) and use LEFT JOIN. Three joins is not much. Quote Link to comment https://forums.phpfreaks.com/topic/234495-joining-3-tables-or/#findComment-1205165 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.