I want to connect the three mysql servers. For example, if it failed to connect the second server, I want to skip the script and try to connect the third server. How could I do that? Here is the script.
<?
$db = mysql_connect here
mysql_select_db(here)
$server = mysql_query(select IP from servers, $db); (return three servers' IP here)
while($row = mysql_fetch_array($server)){
$serverList[0] = $row[0];
$serverList[1] = mysql_connect($serverList[0], 'username', 'password') or die ("can't connect");
.......
!!here. if the second server failed, how can I stop the script ( I mean i don't want the script to continue) and start from while() to connect the third server?
}
Thanx.
Angela