-4
Are there good practices when it comes to SQL queries within php? Or is there an alternative to not "smudge" the code with a giant query in the middle? Edit: What I was looking for was just views, only I didn’t know what name to look for, the answer chosen.
Hey, Vinicius, what’s up? Just so you can understand the Downvotes: avoid questions of opinionated and personal character, always bring codes (or part of code) to better illustrate and exemplify the question and always research, here less by here, if there is no more your question and answer to it.
– Thiago Santos
What I meant by giant query is a query with more than 10 lines for example in the middle of php code. I was seeing that good methods are methods with few lines and with division of responsibilities. I don’t know if there’s any way to improve the code when it comes to that. I tried researching it before but found nothing talking about, or maybe I searched for the wrong thing.
– Rech
Considering the use of a ORM can solve your problem
– Woss
Possible duplicate of How to deal with multiple queries?
– vinibrsl