Re: Opinion about the using $GLOBALS directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux