Link to home
Start Free TrialLog in
Avatar of avir
avir

asked on

codeigniter: return multiple queries to same view

Hi
I have a manual Bootstrap Carousel on Codeigniter of dynamically created content slides. I am trying to get the first row query result for the first slide (item and active carousel classes) and loop through the rest of the results for the rest of the slides (just item class). I don't understand how to show the two queries: first row, rest of the rows, on the same view page. When I load two views for the same function on the controller page they show up one below the other.
I guess I'm asking how to display two query results in specific locations on the view page. In the meantime, I've gotten around this by putting the first row query on the view page inside the first slide div. It works, but I know it's not the right way to do it. I would like to know how I can do this correctly.
An example page can be viewed at:
http://www.imj.org.il/he/exhibitions/2016/pharaoh/page?id=1
carousel.php
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of avir
avir

ASKER

That worked. Thanks.
For the second query, how would I go about getting all the rows except for the first or how would I not include the first row in the result?
Avatar of avir

ASKER

Figured it out using limit and offset.
Sorry, I was away: glad you solved the second question by your self :) And glad to helped you with the first one. Cheers