Okay I know the answer is probably very simple but I just cant seem to figure it out tonight.
What I need to do is get the event that a member has completed.
SELECT t1.Ach_ID, t1.Ach_UserName, t1.Ach_TypeID, t2.AT_Type, t2.AT_Detail, t2.AT_Image, t2.AT_Detail_2, t2.AT_Detail_3, t1.Ach_Time, t1.Ach_Hash, t1.Ach_Expire FROM csv6_network_achievement AS t1, csv6_network_award_types AS t2 WHERE t1.Ach_UserID = '$profileid' AND t1.Ach_TypeID = t2.AT_ID ORDER BY t1.Ach_Time DESC LIMIT 0 , 15
The select above is in production now and is not broken.
What I want to do is allow my members to make commentsabout each event if they want. Just like facebook users do.
To make this work I am adding a comment table that will use the event ID for the relationship.
What would be a good way to get the comments for each event to list for each post?
I can do a select in the loop for each event but that will just increase the number of queries for each page. Any ideas?