Forum Moderators: phranque
[php.net...]
I know its off topic but I've one more thought. If I fail to get a connection the page obvioulsy won't load past the first bit of script. Is there an easy way to detect this and automatically load an html version of that page?
Like the difference between a connection object and a db connection...
What about the situation of not being able to connect? It must happen from time to time, for any number of reasons.
MySQL should have allow_persistent turned ON before you can do mysql_pconnect().
If MySQL doesnt have max_links Unlimited you do have to close your connection all the time.
From all posts .. I get that "best practice" is to open and close connections on every pagec and we really need to justify the use of mysql_pconnect. Another good practice in terms of portability I believe is the use of Pear DB (DB.php) but it does compromise speed a bit.