这应该是table设计时的问题。

解决方案 »

  1.   

    html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>学习php</title>
    </head>
    <?php 
    $connect=mssql_connect("servername","sa","pwd") or die ("连接数据库失败。");
    $select=mssql_select_db("databasename",$connect);
    $sql="select * from tablename";
    $query=mssql_query($sql,$connect);//***********使用row******************
             while ($row=mssql_fetch_row($query))
           {
          echo $row[0]."  ".$row[1]."  ".$row[3]." ".$row[4]." ".$row[5]."<br>";
          }
    ?>
    <body>
    </body>
    </html>
      

  2.   

    select * from tablename
    这两语句在查询分析器没有问题吗?
      

  3.   

    "Unfortunately the ODBC functionality is based off of ODBC v2, which means NTEXT, TEXT, and pretty much any UNICODE is unknown to PHP. Marking this as closed as there is no way to really fix this, without overhauling the entire ODBC system (which is in progress, but no promises)"很早以前也见过,官方也一直没解决,其实也不是PHP的错,而是微软提供的C-library不支持ntext和nvarchar而已。
      

  4.   

    将ntext改为text,nvarchar改为varchar