1.Com链接,ADODB.Connection
代码如下 | 复制代码 |
$conn = new Com(“ADODB.Connection”); //实例化一个Connection对象 $rs->Open(‘select * from News where bigclassid = 59 And LeadPostil is null’, $conn, 1, 1); $arr_result[$i]['Title'] = addslashes($rs->Fields(‘Title’)->Value);//标题 } |
2.ODBC连接mssql
代码如下 | 复制代码 |
$dbhost = ”; $connect=odbc_connect(“Driver={SQL Server};Server=$dbhost;Database=$dbname”,”$dbuser”,”$dbpass”); |