07-29-2008, 10:38 PM
[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.
Yeah, but not the ONLY way and probably not the BEST way. We won't go there again though...
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...