![]() |
Returning value from a model to the controller after a few iteration of recursive function - 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: Returning value from a model to the controller after a few iteration of recursive function (/showthread.php?tid=52798) |
Returning value from a model to the controller after a few iteration of recursive function - El Forum - 06-27-2012 [eluser]Unknown[/eluser] I have a function that search category_id of top level parent category. But after 1 iteration it doesn`t return value to controller. Controller: Code: $top_parent = $this->catalog_model->top_parent($catalog_id); Model: Code: function top_parent($category_id) How can I return found value to controller with recursive function? Returning value from a model to the controller after a few iteration of recursive function - El Forum - 06-27-2012 [eluser]vitoco[/eluser] Just return the value of the recursive call Code: function top_parent($category_id) Saludos Returning value from a model to the controller after a few iteration of recursive function - El Forum - 06-27-2012 [eluser]Unknown[/eluser] You are a genius! And I need sleep better... Anyway, thank You! |