![]() |
How can I use a model function in the same model - 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: How can I use a model function in the same model (/showthread.php?tid=60852) |
How can I use a model function in the same model - El Forum - 07-13-2014 [eluser]Wathfea[/eluser] Hi All! I have a function which rerturn a value from the DB. How could I call this function in the same model? Code: <?php How can I use a model function in the same model - El Forum - 07-13-2014 [eluser]CroNiX[/eluser] Code: public function something() { How can I use a model function in the same model - El Forum - 07-13-2014 [eluser]Wathfea[/eluser] Thx a lot working like a charm. ![]() How can I use a model function in the same model - El Forum - 07-15-2014 [eluser]www.sblog.in[/eluser] when you are using the function from same class and if no other class will use that function then why don't you make that private private function get_something($id) { //SQL bla bla . Request by id return $result; } |