I think the reason I can’t find what I’m looking for is because I’m asking the wrong question. I’m new to codeigniter and mysql and I’m hoping someone can make sense of what I’m looking to do.
I have 2 tables:
Products:
id | name | price | store#
Store:
store# | address | phone | etc..
How can I query the products along with the store information at the same time? Say I grab product id #42 and it give me store #21. Is there a way to run 1 single query to pull all the data at the same time from both tables by simply searching for the product id?
I think JOIN is what I need to use but I’m a little confused. I’m hoping someone can clarify and point me in the right direction.
Something along these lines should do that. 🙂