db query during another query - 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 query during another query (/showthread.php?tid=41712) |
db query during another query - El Forum - 05-15-2011 [eluser]Unknown[/eluser] Hi, Let's say I have the following code: Code: function getSomeVal(){ As you can see, during while building the main query, I'm calling a function which (to return a value) also builds a query. I suppose this will not work, what's the solution to this problem? I may forget that the getSomeVal() function also uses db object... db query during another query - El Forum - 05-15-2011 [eluser]darrentaytay[/eluser] Code: function getSomeVal(){ db query during another query - El Forum - 05-15-2011 [eluser]Unknown[/eluser] Thanks, Yes, I know I can do that, but I have to remember about doing that btw: but am I actually right that my version will not work? Because I actually can't test it right now. db query during another query - El Forum - 05-15-2011 [eluser]darrentaytay[/eluser] I think your version would work fine |