这样写试试:
<?
$mssql_hostname = "ALEX\ALEX";
$mssql_hostuser = "sa";
$mssql_hostpasswd = "alex";
$mssql_hostdb = "sim";
$link=mssql_connect($mssql_hostname,$mssql_hostuser,$mssql_hostpasswd) or die("error_connect");
mssql_select_db($mssql_hostdb,$link);//注意这里$res=mssql_query("select count(*) as aa from user");
$data=mssql_fetch_array($res);
echo $data["aa"];
?>
<?
$mssql_hostname = "ALEX\ALEX";
$mssql_hostuser = "sa";
$mssql_hostpasswd = "alex";
$mssql_hostdb = "sim";
$link=mssql_connect($mssql_hostname,$mssql_hostuser,$mssql_hostpasswd) or die("error_connect");
mssql_select_db($mssql_hostdb,$link);//注意这里$res=mssql_query("select count(*) as aa from user");
$data=mssql_fetch_array($res);
echo $data["aa"];
?>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货