Welcome Guest, Not a member yet? Register   Sign In
Extending Main model and not the CI Model
#1

Hello Everyone!


Greetings!

I have a Main Model and it was extended to CI Model. I've created another model and extended to the Main Model and not to the CI Model. Is it okay to use like this? Please give some advice or recommendations.

Here are my codes:

Code:
//Main_model.php
class Main_model extends CI_Model {

//all common functions will be put here e.g., insert, update, delete ...

}


Code:
//Another_model.php
require 'Main_model.php';
class Another_model extends Main_model {

//all unique functions for every model will be coded here

}

Any comments and suggestions will be appreciated!

God bless and more power!
Reply


Messages In This Thread
Extending Main model and not the CI Model - by lazyfox - 10-11-2015, 07:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB