>But once I had moved most of my code into object methods and functions 
>(and therefore out of the global namespace/scope/whatever), I realized 
>this really didn't matter as much.  In fact, for consistency and 
>neatness, it was better that I use only $sql or $result, since there was 
>only ever one query in the method or function definition, and this 
>terseness was less cluttering to my code.

Well, yeah, at that point all you have is SQL and Result, because the
function has no idea what that SQL is about in any given call...

But, personally, I just don't see the point to having a function/class do my
database work when it simply:

Increases lines of code
Increases debugging/maintenance time
Decreases clarity of code
Reduces performance
Reduces flexibility
Increases overhead

My personal preference is to just:

include 'connection.inc';
.
.
.

$query = "...";
$whatever mysql_query($query) or error_log(mysql_error());
# Deal with $whatever


I just don't see a cost/benefit ratio that makes sense in the DB classes.

I know it's a minority opinion, but I've never been afraid of being in the
minority.

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to