Welcome Guest, Not a member yet? Register   Sign In
my_model, queries and joins
#1

[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



Messages In This Thread
my_model, queries and joins - by El Forum - 04-16-2012, 12:56 PM
my_model, queries and joins - by El Forum - 04-16-2012, 02:41 PM
my_model, queries and joins - by El Forum - 04-16-2012, 02:55 PM
my_model, queries and joins - by El Forum - 04-16-2012, 02:57 PM
my_model, queries and joins - by El Forum - 04-16-2012, 03:14 PM
my_model, queries and joins - by El Forum - 04-16-2012, 03:24 PM
my_model, queries and joins - by El Forum - 04-16-2012, 03:29 PM
my_model, queries and joins - by El Forum - 04-16-2012, 03:39 PM
my_model, queries and joins - by El Forum - 04-16-2012, 04:30 PM
my_model, queries and joins - by El Forum - 04-16-2012, 04:33 PM
my_model, queries and joins - by El Forum - 04-16-2012, 04:45 PM
my_model, queries and joins - by El Forum - 04-16-2012, 06:33 PM
my_model, queries and joins - by El Forum - 04-16-2012, 07:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB