实例: 复制代码 代码如下: <?php $conn1 = mysql_connect(“127.0.0.1”, “root”,”root”,”db1′′); mysql_select_db(“db1”, $conn1); $conn2 = mysql_connect(“127.0.0.1”, “root”,”root”,”db2′′); mysql_select_db(“db2”, $conn2); $sql = “select * from ip”; $query = mysql_query($sql); if($row = mysql_fetch_array($query)) echo