Welcome Guest, Not a member yet? Register   Sign In
is it ok to have repeated codes in controllers
#1

[eluser]rajneeshgobin[/eluser]
hello i am quite new in CI, have these tables in mysql

animal

hobby

and jobs


i have these models

animal_model

hobby_model

jobs_model

then i have the coresponding controllers

animalctrl,hobbyctrl jobsctrl

in all 3 controllers i have nearly same functions

such as insert,update ect

where i basically copied and pasted 3 times

is it ok to do like this

or i should have one controller for all 3 tables. then pass parameters to know which model to load ect.






Messages In This Thread
is it ok to have repeated codes in controllers - by El Forum - 09-22-2014, 12:12 AM
is it ok to have repeated codes in controllers - by El Forum - 09-22-2014, 08:50 AM
is it ok to have repeated codes in controllers - by El Forum - 09-23-2014, 11:55 AM
is it ok to have repeated codes in controllers - by El Forum - 09-24-2014, 01:56 AM
is it ok to have repeated codes in controllers - by El Forum - 09-24-2014, 04:58 AM
is it ok to have repeated codes in controllers - by El Forum - 09-24-2014, 06:44 AM
is it ok to have repeated codes in controllers - by El Forum - 09-24-2014, 09:25 AM
is it ok to have repeated codes in controllers - by El Forum - 10-01-2014, 01:57 AM
is it ok to have repeated codes in controllers - by El Forum - 10-01-2014, 02:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB