php - Can a Controller have database queries (MySQL)? If yes, when? -
I'm reading a lot of tutorials on MVC, so my question, can do database queries in an ideal PHP MVC framework controller Are you As I understand, the most comfortable way to put all database queries in the model is right? And if I have any post or mess, then I pass that post with the model and it covers all and etc.
Or am I missing something? And if the controller can have a database query, what will happen in that situation?
No controller can be any db related code - MVC architecture in any db questions model Can be stored in - Controller works only with model, but not directly with DB
Edit: Most frameworks allow SQL to call SQL directly - but then MVC is not , But the bunch of objects
Comments
Post a Comment