如何在php中连接两个以上的数据库,即(3个数据库)

时间:2014-12-15 05:27:09

标签: php

$con1=mysql_pconnect("localhost","root","") or die("not connected to server");

mysql_select_db("wheels",$con1) or die("not connected to database");

$con2=mysql_pconnect("localhost","root","",true) or die("not connected to server");

mysql_select_db("pakbikes",$con2) or die("not connected to database");

$con3=mysql_pconnect("localhost","root","", true) or die("not connected to server");

mysql_select_db("olx",$con3) or die("not connected to database");

但它无法正常工作只连接2个数据库......

0 个答案:

没有答案