> As the previous post of using die would be better. Also try using
> mysql_pconnect (for persistant connections) and also, if you are
running
> more than one query per script execution, then DON'T keeping trying to
> connect/select database.

Only use persistent connections if you really sure you need them and you
understand the implications. Sometimes they can help, sometimes they can
hurt. Don't just take the buzzword "persistent" and assume you need to
use it. 
 
> I suggest you do the first two things at the start of ALL the scripts
that
> will need to connect to the database, so make an include file with 2
> things
> (connecting and selecting a database). Then make another function just
for
> queries, this way on the second and onward queries will save overhead
some
> from connecting and selecting a database.

Second that...

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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

Reply via email to