can I put <cfquery> in view files or query o...
# box-products
m
can I put <cfquery> in view files or query only exist in handler?
p
You should put it in the handler and then output it in your view.
a
To be honest - I'd put it in the "model" code and then call it from the handler (to get the data) and then output it in the view. That is what the MVC pattern that ColdBox is based on. It's roughly - The controller (aka handler) knows what to ask for the data. The model knows how to to get the data. The view knows how to display the data.
👍 1