Welcome Guest, Not a member yet? Register   Sign In
Extended the DB
#1

[eluser]Unknown[/eluser]
I need to overload the insert, query, update, delete functions....can't figure out what to extend or that to do to get it to work...basically I want to do something then pass it off to the internal query/insert/update/delete functions

I'm not sure what to extend....

I want to basically add 1 variable to the methods at the end to use memcache if set to true....and then run the parent query, insert, update, delete to do the action....

Thank you
#2

[eluser]Dready[/eluser]
Hello,

after having read the code, it's not that easy to extend CI database classes. For your own problem, the simplest seems to be to overwrite the file "system/database/DB_active_rec.php", or to extend it and add your extended class in the loading logic inside "system/database/DB.php".

Good luck !
#3

[eluser]Derek Allard[/eluser]
In fact, "Note: At this time the Database classes can not be replaced with your own versions." (Creating Libraries). Sorry. Couldn't you just put code in your controller that run additional tasks after the insert is completed?




Theme © iAndrew 2016 - Forum software by © MyBB