时间:2021-07-01 10:21:17 帮助过:19人阅读
连接代码:
Php代码
<?php $mssql=mssql_connect("192.168.0.104","sa","123456"); if ($mssql) { echo "Connent Mssql Succeed<br />"; mssql_select_db("jj2011"); $sql="select * from dbo.orders"; $queryuser = mssql_query($sql); $rowuser = mssql_fetch_assoc($queryuser); echo $rowuser['Order_ID']; } else { echo "connent Mssql Error!"; }
连接失败 可能的原因:
(1)windows 中防火墙没有允许sql server2000:
(2)php.ini中需要添加
extension=mssql.so