![]() |
Array parse problem - 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: Array parse problem (/showthread.php?tid=4558) |
Array parse problem - El Forum - 12-03-2007 [eluser]iniweb[/eluser] I have this code: Code: function Index() All work, but count_images return latest value for all galleries. Gallerys.tpl: Quote:{galleries_list} Array parse problem - El Forum - 12-03-2007 [eluser]tonanbarbarian[/eluser] yes $data['count_images'] will always be the last value of $num->num_rows because the array is recreate in each pass through the loop try doing this instead Code: if($gallery->num_rows != '0') but personally I would try to use a single query to get all of the data and then build the array structure from that. because for each "galleries" record you are running a seperate query - if one day you have 100 or even 1000 galleries you will be running 101 or 1001 queries when you can do it all in 1 query. Array parse problem - El Forum - 12-03-2007 [eluser]iniweb[/eluser] Erorr: Quote:Severity: Warning Array parse problem - El Forum - 12-03-2007 [eluser]tonanbarbarian[/eluser] Cant help you with that one. What is the Parser library? It is not a core library. |