This is a discussion on Quick host alive check within the alt.comp.lang.php forums, part of the PHP Programming Forums category; In an online submission for a quote we've had intermittent errors if the mysql server goes down. This errors ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
"john henry bonham" <with@he.ld> wrote in message
news:4174e983$0$94917$5a6aecb4@news.aaisp.net.uk.. . > In an online submission for a quote we've had intermittent errors if the > mysql server goes down. This errors cause prices to display at £0.00 > > What's the best way to check the host is alive before the rest of the > code runs? I've often seen the suggestion to issue the query "select 1". However, such a technique won't do you any good if the server goes down right after than. Nothing will beat basic error checking after each attempted database access, coupled with appropriate error handling. - virgil |