How to add a custom db call to codeigniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: How to add a custom db call to codeigniter (/showthread.php?tid=326) |
How to add a custom db call to codeigniter - maykino - 11-21-2014 Guys, I would like to add my custom "multiple insert" function to CodeIgniter but I'm not sure what would be the best place for it. This is what the function looks like: Code: function insert_multiple($table_name, $data) RE: How to add a custom db call to codeigniter - kilishan - 11-23-2014 There is already an "insert_batch" method that might be what you're looking for. You can always create a MY_Model class, though, that extends CI_Model and add that method to it. RE: How to add a custom db call to codeigniter - Rufnex - 11-24-2014 As killishan said there is a method described here: http://www.codeigniter.com/userguide3/database/query_builder.html#this-db-insert-batch |