php - How to custom library DB using Codeigniter -


i want custom few things in library db...

and created core system classes my_db in application/core folder:

class my_db extends ci_db {     public function __construct() {         $ci =& get_instance();         $ci->load->database();         $this->db = $ci->db;     }      public function get($table = '', $limit = null, $offset = null) {         // code custom...         $this->db->get($table, $limit, $offset);     }     public function insert($table = '', $set = null) {         // code custom...         $this->db->insert($table, $set);     } } 

but apparently not work.

i want when execute $this->db->get(), run code customized within class my_db.

if take @ problem , share bit of science, i'd grateful. thanks!

codeigniter (at time, latest version 3.0.0) doesn't support extending database classes other libraries. it's not impossible of course, there's no official, built-into framework way , you'll have come own hack it.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -