Welcome Guest, Not a member yet? Register   Sign In
Adding database functionallity
#1

Hello,

I want to add THIS functionallity to the db->insert function, but i have no idea how to add such functionallity.

I thought i could do something like this:
Code:
class MY_db extends CI_db {

public function __construct($params) {
  parent::__construct($params);
           log_message('debug', 'Extended DB class instantiated!');
  }

public function insert($table = '', $set = NULL, $escape = NULL, $update_on_duplicate = FALSE) {
// Use regular insert function when $update_on_duplicate == FALSE
if(!$update_on_duplicate) return parent::insert($table, $set, $escape);

// --- My code ---

}


}

Can anyone tell me where i should put this code and how i can (auto)load the class?

Greetz

PS: Sorry for my awfull English Angel
Reply


Messages In This Thread
Adding database functionallity - by JustMoes - 05-04-2015, 08:00 AM
RE: Adding database functionallity - by mwhitney - 05-04-2015, 02:00 PM
RE: Adding database functionallity - by Urastor - 05-06-2015, 12:49 PM
RE: Adding database functionallity - by JustMoes - 05-10-2015, 11:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB