CodeIgniter Forums

Full Version: joint query
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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.


El Forum

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.

El Forum

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