how to create funciton or class or??? - 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 to create funciton or class or??? (/showthread.php?tid=13720) |
how to create funciton or class or??? - El Forum - 12-02-2008 [eluser]li9ht[/eluser] ive been using lots of query to do this Code: $sql5=$this->db->select_sum('total','total'); the only thing changing is the date. can i create a function and just send the date to the function/class and insert in my index function .. how do it do it.? how to create funciton or class or??? - El Forum - 12-02-2008 [eluser]JoostV[/eluser] [EDIT] removed a superfluous or_where Say you do you query in the index() method of your controller. Then you would get this. Code: function index() { You had best move the _date_query($dates) function to a model, bacause it handels db actions. (remove the underscore from the function name, in that case.) how to create funciton or class or??? - El Forum - 12-02-2008 [eluser]li9ht[/eluser] ok thx.. im trying it. |