![]() |
DB and nested calls - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: DB and nested calls (/showthread.php?tid=45480) |
DB and nested calls - El Forum - 09-23-2011 [eluser]elite-board[/eluser] hi, I have a situation that I'm trying to debug. there is a page that i need to call two sql queries, and they have to be nested as one query relies on the previous entry. example of this Code: SELECT id FROM category ORDER BY Sort ASC now my issue is that the first query fires perfectly fine, however the second one does not. heres my code: Code: $this->db->select('id,Name')->from('category')->order_by("title", "asc"); I'm open to trying a join, but i just don't see that working correct as the UI looks like [HEADER] [column] [BODY] the items in all caps are the db data. I hope someone can help me on this as i'm getting stuck. Thanks. |