----在这里,复制ntwdblib.dll到c:windowssystem32下是失败,原因是该目录下已经存在该dll文件啦.
我重启apache,
*/
$hostname="10.4.250.20";
$dbuser="hr";
$dbpasswd="946138";
$dbname="hr";
$conn = mssql_connect($hostname,$dbuser,$dbpasswd) or die("数据库连接错误!");
mssql_select_db($dbname,$conn);
$sql = " select * from pip_staff_s where cstaffid ='z797' ";
$rowset=mssql_query($sql,$conn);
$rowcnt=mssql_num_row($rowset);
echo " rows ";
echo $rowset;
echo " end ";