展开全部
就是通过连接字符串建立的连接,该链接用一个可识别的变量或常量来表示。例如有两个人:张四,王五,那么这个名字就是这两个人的标识符。
如在php中
<?php
//声明mysql连接标识符mysql_connect("mysql主机地址","用户名","密码");
$Conn1 = mysql_connect("192.168.1.110","root1","root1pwd");
$Conn2 = mysql_connect("192.168.1.112","root2","root2pwd");
//查询1
$SQL1 = "select * from YourTable1 ";
$_r_s1 = mysql_query($SQL1, $Conn1);
//查询2
$SQL2 = "select * from YourTable2 ";
$_r_s2 = mysql_query($SQL2, $Conn2);
//在每次查询中,对应的连接标识符$Conn1,$Conn2不能出错,否则会得到不一样的结果或者根本就无法运行啦。
?>
如在php中
<?php
//声明mysql连接标识符mysql_connect("mysql主机地址","用户名","密码");
$Conn1 = mysql_connect("192.168.1.110","root1","root1pwd");
$Conn2 = mysql_connect("192.168.1.112","root2","root2pwd");
//查询1
$SQL1 = "select * from YourTable1 ";
$_r_s1 = mysql_query($SQL1, $Conn1);
//查询2
$SQL2 = "select * from YourTable2 ";
$_r_s2 = mysql_query($SQL2, $Conn2);
//在每次查询中,对应的连接标识符$Conn1,$Conn2不能出错,否则会得到不一样的结果或者根本就无法运行啦。
?>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询