PHP同时操作两个mysql数据库

 

$connect=mysql_connect("localhost","root","",true);
$db=mysql_select_db("test",$connect);
mysql_query("set names utf8");
$connect2=mysql_connect("localhost","root","",true);
$db2=mysql_select_db("test",$connect2);
mysql_query("set names gbk");

 

posted @ 2015-01-23 13:25  dekevin  阅读(771)  评论(0编辑  收藏  举报