Built Report Page |
[eluser]sqwk[/eluser]
I have two db tables "enquiries" and "emails" I would like to built a report that shows a paginated list of all enquiries with the relevant emails listed under each enquiry row. How would I go about doing this in CI?. MySQL cannot handle this by itself as I need to get multiple rows from the emails table. (otherwise I would use correlated subqueries.) I want to show the data in a nested table like so: Code: repeat this for all ENQUIRY rows { I thought of getting each enquiries and emails individually like so: Code: $this->load->model('enquiries'); Where get_enquiries would get a selection of rows and get_emails only gets the rows that are linked to any of the enquiry rows. How can I link the two together in a viewfile? Or even better built a nested array out of them?
[eluser]sqwk[/eluser]
Slightly changed this: http://ellislab.com/forums/viewthread/87994/P0/ into: Code: function get_enquiries() { |
Welcome Guest, Not a member yet? Register Sign In |