Welcome Guest, Not a member yet? Register   Sign In
Forced to run DB Query from View (Bad practice?)

[eluser]Colin Williams[/eluser]
An easy guideline to follow is "never run a query inside of a loop." The same result can be obtained by running a query and then looping. In fact, when using JOIN queries, you're almost ALWAYS going to need to loop through the result and build your own data structure.

Quote:Actually, it’s a good way of creating a more modular application and reducing redundant code.

Yeah, but not the ONLY way and probably not the BEST way. We won't go there again though...

Theme © iAndrew 2016 - Forum software by © MyBB