[eluser]dpdp[/eluser]
Hi guys,
I know my way around CI pretty well, until it comes to relational tables. My lead developer had to take off for a day and I need to be able to query these results possibly.
I'll give you a rough outline of the table structure he has setup here
tbl_users (user data stored here) user_id
tbl_avatars (avatar filenames are in here with some other related info) avatar_id
tbl_avatars_users (he's using this to join the two together) user_id, avatar_id
So, whether he did that right or wrong isn't my main concern (but any input on that is appreciated). My situation is as follows.
Not all users have avatars. But I need to query the 30 latest users, and render the avatars, if they don't have an avatar, the default avatar is used. However! If I use join(tbl_avatars etc etc) I only get results consisting of the latest 30 users who HAVE avatars.
Is there a way to do this? Possibly without join?
You're help, in any fashion, is immensely apprecated. Needed it done 3 hours ago, hah!