Keith Devens .com |
Saturday, March 20, 2010 | ![]() |
| Follow the path. – me | ||
|
| ← Movie takeback | The Ultimate Weblogging System → |

127.0.0.1 (http://abulman.co.uk/) wrote:
Keith (http://www.keithdevens.com/) wrote:
The larger point is that he doesn't have a clue what he's doing, which is dangerous.
A lot of times, people do really dumb things like nested loops doing SQL queries in the inner loop (which is really bad). And the tables won't have indexes to boot. They'll include() files by typing in their domain names, like include("http://foo.com/include.php"), rather than simply include("./include.php"), which makes apache do a network request for each include.
So the issue isn't just what this particular code happens to do... For instance, I'm not even sure that he didn't mean to select the sum from the database 270*9 times, that he doesn't have 270 fields in each of his tables, nor how many tables he has that he's selecting from.
63.247.131.116 (http://abulman.co.uk/) wrote:
All true, all the more reason I'm glad I run my own systems.
Ben (http://www.trollscript.de/blog) wrote:
Perhaps someone should explain to him how GROUP BY and JOINs work. No, better not, he should look it up himself. 
As long as he's still getting parse errors, I wouldn't worry too much. But if he advances and tries out what happens with infinite loops... you can only hope that he's smart enough to do his testing on a local system.
Mean Dean (http://www.healyourchurchwebsite.com) wrote:
Ah, cut-n-paste programming. My favorite.
We should find out where this guy works. While I agree with Ben, this is definately a SQL solvable situation, I'm wondering if this guy really needs tables A through I? I'd be curious to know why there are so many tables with the same field in all of them.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):
Generated in about 0.116s.
(Used 8 db queries)
I wouldn't worry about it much, with the semi-colons at the end of the 'for' lines, he's mainly just counting to 270 eight or nine times.