{comm_author} 在 {comm_posttime} 说:
{comm_content}
不能用 DB-Library(如 ISQL)或 ODBC 3.7 或更早版本将 ntext 数据或仅使用 Unicode 排序规则的 Unicode 数据发送到客户端。
的处理办法
------------------------------------------------
由于sql server中,ntext和nvarchar字段是用unicode编码存储内容的,因此php通过mssql扩展读取带ntext和nvarchar类型字段的时候会抱错。
如果 title 字段类型为 nvarchar,content 字段类型为 ntext ,那么下面的sql语句会报错:
select title,content from article where 1
正确的写法是:
select convert(varchar(255),title) as title, convert(text,content) as content from article where 1
或者不使用ntext字段