MSSQL Query issue in PHP and querying text data

前端 未结 3 1743
遥遥无期
遥遥无期 2020-12-04 18:21

I\'m trying a query in PHP to connect and extract data from a MSSQL EXPRESS (2008 R2) database. But i\'m getting an error when i\'m pulling ntext based data from the DB.

3条回答
  •  情书的邮戳
    2020-12-04 18:43

    Couple of options from the comments on the mssql_query() manual page

    • SELECT CAST(field1 AS TEXT) AS field1 FROM table
    • Chang the version in /etc/freetds.conf from 4.2 to 8.0 (if the PHP server is *nix)
    • Avoid SELECT * queries

    Plenty more if you search ntext on that page.

提交回复
热议问题