$con = mysql_connect("127.0.0.1","账号","密码");
if(!$con){
die('Could not connect:'.mysql_error());
}
mysql_select_db("数据库名",$con);
//操作数据库增删改查
.
.
.
mysql_close($con);
$con = mysql_connect("127.0.0.1","账号","密码");
if(!$con){
die('Could not connect:'.mysql_error());
}
mysql_select_db("数据库名",$con);
//操作数据库增删改查
.
.
.
mysql_close($con);