Re: Re: local v remote

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

 



On Thu, May 31, 2007 8:07 am, M. Sokolewicz wrote:
> In case you didn't know, 99% of code on this planet using mysql_query
> does not supply the secondary argument as most code-bases don't use >
> 1
> connection in the same script.

That does not make it a Good Practice...

I spent days fixing somebody else's code who thought they were opening
a second connection (not) and then were closing it (yep) but they were
actually closing *MY* database connection, because they were too lazy
to type that second arg.

I personally think you should never, ever, ever, write code that
relies on the default open connection.

Sooner or later, the project will grow, morph or merge into something
where you'll get your wires crossed.

It costs only a few keystrokes in a few places to do it right.

YMMV

-- 
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/browse/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