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

[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...


Messages In This Thread
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 09:10 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 09:16 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 10:45 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 12:30 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 01:39 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 04:31 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 05:23 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 05:30 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 06:24 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 04:04 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 05:14 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 06:42 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 07:39 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-28-2008, 10:37 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-28-2008, 10:53 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 07:10 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 05:11 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 06:17 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 07:37 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 08:55 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 10:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB