#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Php database help


    Hello Sir,

    I need one help in my php file.. I have one database information in php file where form query go but when website lost database connection it shows error system is busy.. Is it Possible i add 2 database informations if one get lost query pass to another database if both lost then it show system is busy.. If you want i will show u my coding please reply..
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2009
    Posts
    724
    Rep Power
    7
    A basic if/then/else should take care of this. You would enter this where you place your initial connection. Initially, you would make an attempt at the desired server. Then, with the IF portion, you would check the error/status of that connection attempt. IF it is successful, and doesn't provide such error, THEN do as define, ELSE use the second connection.
    He who knows not and knows not he knows not: he is a fool - shun him. He who knows not and knows he knows not: he is simple - teach him. He who knows and knows not he knows: he is asleep - wake him. He who knows and knows he knows: he is wise - follow him

IMN logo majestic logo threadwatch logo seochat tools logo