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. Link to comment https://forums.phpfreaks.com/topic/224760-avatar-help/ 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. Link to comment https://forums.phpfreaks.com/topic/224760-avatar-help/#findComment-1161032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.