CodeIgniter Forums
joint query - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: joint query (/thread-8468.html)

joint query - El Forum - 05-19-2008

hi everyone,

I have been looking for a tutorial that describes how to deal with multiple tables.

with larger sites there are multiple tables cross referenced. for example in a store we have to make a query for
product - image xref
product - category xref
and so on...

so my question is, since I can only send one set of data from the Model to the View I seem to have to make one big query that pulls everything.

in php I used to make loops in loops. like query for product and then inside that loop I would query for images related for that product.

can anyone show me an example how I am supposed to deal with this in the MVC structure.
the examples out there don't go farther than explaining the MVC structure with one table in the data base.


joint query - El Forum - 05-19-2008

If i correctly understood what you were asking about: performing multiple queries on different tables in one database. I think this thread Please Help Multiple Queries might help you.

joint query - El Forum - 05-19-2008

Hi ladamis,
You are looking for explanation how to create query with multiple joins and how to use returned result, right?