<?php
$host="CHENGXIANJU";
$user='sa';
$password='01211107';
$database='copy0551fcdbs';
$link=mssql_connect($host,$user,$password);
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
mssql_select_db('copy0551fcdbs', $link);
$sql='select top 10 Second_Title,Contents from T_News order by Id desc';
// $sql='select top 10 Second_Title,convert(varchar,Contents) as content from T_News order by Id desc';
$rs=mssql_query($sql);
while($row=mssql_fetch_array($rs)){
print_r($row);
}
提示如下错误:
Warning: mssql_query() [function.mssql-query
]:
message: 不能用 DB-Library (如 ISQL)或 ODBC 3.7 或更早版本将 ntext 数据或仅使用 Unicode
排序规则的 Unicode 数据发送到客户端。 (severity 16) in D:\php5\sqlserver.php on line 13