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? 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. 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? 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. Link to comment https://forums.phpfreaks.com/topic/259705-lost-here-different-tables/#findComment-1331184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.