I-AM-OBODO Posted March 25, 2012 Share Posted March 25, 2012 Hi, I have different tables in my database. Do i need to create different models and controllers for each table or can i use one model and controllers for all the tables? Quote Link to comment https://forums.phpfreaks.com/topic/259705-lost-here-different-tables/ Share on other sites More sharing options...
trq Posted March 25, 2012 Share Posted March 25, 2012 A controller can use many different models, but a model generally represent a single table when modelling stuff from a database. Quote Link to comment https://forums.phpfreaks.com/topic/259705-lost-here-different-tables/#findComment-1331034 Share on other sites More sharing options...
I-AM-OBODO Posted March 26, 2012 Author Share Posted March 26, 2012 A controller can use many different models, but a model generally represent a single table when modelling stuff from a database. are you saying i can have one controller but different models for each table? Quote Link to comment https://forums.phpfreaks.com/topic/259705-lost-here-different-tables/#findComment-1331176 Share on other sites More sharing options...
trq Posted March 26, 2012 Share Posted March 26, 2012 Yes. Quote Link to comment https://forums.phpfreaks.com/topic/259705-lost-here-different-tables/#findComment-1331184 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.