Get a query with a limit and offset and see if a result belongs to that |
[eluser]FabioAntunes[/eluser]
Hi there I'm struggling here with this little problem. I have a pagination that shows 10 results each time,(10 student classes), what I want to do is instead of beginning in page 1 show as default the page that somewhere in that 10 results has the id of a student class. Code: $idClassRoom= 100; I hope I made myself clear
[eluser]weboap[/eluser]
check this tutorial for a CI pagination example http://net.tutsplus.com/articles/news/co...agination/
[eluser]FabioAntunes[/eluser]
[quote author="weboap" date="1338576162"]check this tutorial for a CI pagination example http://net.tutsplus.com/articles/news/co...agination/ [/quote] But I already have a pagination working, that didn't help nothing at all. I just want to know if there's a way to "query a query" with active records: I'll try to explain myself again, I have this query wich has a limit of 10 results Code: $this->db->start_cache(); And I cached it, so i can apply the limit and after applying the limit I want to verify if in that 10 results I limited there is the idClassroom I wanted I can solve the problem this way Code: $this->db->start_cache(); I just want to know if there's a better way. |
Welcome Guest, Not a member yet? Register Sign In |