takn25 Posted January 17, 2011 Share Posted January 17, 2011 Hi everyone, I need some help. I have made a comment system, where users have to be logged in to post their comments. I am stuck at displaying an avatar for each user. What I am trying to do is, there is a table for users login details and their avatar than there is a table for comments. I would like to do is take the users avatar from the login table and post it in the comments table, when the user comments, so I can echo different avatars, depending on who commented, if there is a different more simpler way I would like to know it. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
requinix Posted January 17, 2011 Share Posted January 17, 2011 Instead of SELECTing from only the comments table, JOIN in the users table too. Then you'll get each comment and all the user information associated with who posted it... including their avatar. Quote Link to comment 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.