On Wed, December 19, 2007 8:14 am, js wrote:
> That wouldn't work well when you have to update multiple tables in a
> transaction.
> I think it's more maintainable to use GLOBALS than passing around dbh
> to classes/functions.

I also just use a 'global' for my db connection, for small to medium
web applications.

It's used all over the place, it's only one variable, and it's just
not that tricky to remember that it's a global named $connection

Others I'm sure consider this "bad" but there it is.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

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

Reply via email to