[eluser]tomdelonge[/eluser]
I've never used a join before, so I'm not quite sure if my situation is right for it.
Say I have a product and I need to retrieve the name of the category it is placed in. I only store the category id in the product table.
Product Table
id
name
category_id
Category Table
id
name
So, as you can see, I need to retrieve the name of the category associated with the product id.
What's the best way to do this? Do I use a join? Or not at all, and just take the long way which would be way more complicated, as I'm retrieving several products.