Code Comments
Programming Forum and web based access to our favorite programming groups.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?
Post Follow-up to this message"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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.