Posted by Screenack on January 31, 2011 at 2:59am
I maintain a production and development environment. I commonly sync the files and database data and switch the connection string for the environment. For both production and development, the database is only accessible from the hosted machine. Shouldn't this be possible, i.e.,
Development string (If available load and move on. if dev server not available, use the next string)
Production string
Thanks!

Comments
The way I normally handle
The way I normally handle this is to have the code in version control and locally modify the line on either live or development (both in the file, but one commented out).
You could also check some environment variable, since you can put code in settings.php - but I wouldn't have it try to connect to both databases and have one fail, because that will delay every single request.
Ken Winters