Hi, This might not necessarily related to cake, but I would like to know what's the best way to do this.
I have a users table (that has user_id, first_name, last_name...etc) And a profile table (profile_id, user_id, country....) And a friends table which has (friend_id, user_id profile_id) Now on the profile page, for that particular profile, I query friends table to get the user_id's of all the friends and display their photos, because all photos are user_id.jpg, but now I want to display the user's first name as well but that is in the user's table. I have 2 approaches - 1) Put user_name also in the friends table 2) Loop through all friends and for every entry go to the user table to get the user first name What do you guys suggest? 2nd one will have lots of select queries whereas first one would just duplicate data? Thanks in advance, Mandy. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---