I am reading lots of tutorials on MVC, so my question, can a perfect PHP MVC framework have database queries in Controller? As I understand, the most comfortable way is to put all database queries in Model, right? And if I have POST or smth, I just pass that POST to Model and it makes all inserts and etc. ?
Or I am missing something? And if Controller can have a database queries, in which situation would it be?
No controller may not have any db related code – any DB queries may be stored in model in MVC architecture – controller only works with models, but not directly with DB
EDIT: Most frameworks will allow calling SQL directly from Controller – but then it is not MVC, but bunch of objects