04-16-2012, 12:56 PM
[eluser]threestate[/eluser]
good day
so, i'm trying to work with joins and my_model.. and i'm really struggling..
i have 3 tables
posts
post_id
post_title
cats
cat_id
cat_title
and
post_cat
post_id
cat_id
where the tblpost_cat is essentially a joining reference for all the posts and whatever categories they may belong to...
i can't figure out for the life of me, how to join it all together
can someone please help?
i can get all of the data out, but as the post_cat table can have multiple entries of the same post, i dont know how to just display that post once, and list the categories it belongs to
good day
so, i'm trying to work with joins and my_model.. and i'm really struggling..
i have 3 tables
posts
post_id
post_title
cats
cat_id
cat_title
and
post_cat
post_id
cat_id
where the tblpost_cat is essentially a joining reference for all the posts and whatever categories they may belong to...
i can't figure out for the life of me, how to join it all together
can someone please help?
i can get all of the data out, but as the post_cat table can have multiple entries of the same post, i dont know how to just display that post once, and list the categories it belongs to