$this->query=sqlsrv_query($conn, $text);
执行失败你 var_dump($this->query); 看看是什么

解决方案 »

  1.   


    $conn = sqlsrv_connect( $serverName, $connectionInfo);
    $this->query=sqlsrv_query($conn, $text);
    var_dump($this->query);
    echo '<br>';
    }
    //以对象形式取得查询结果数据
    function Record()
    { var_dump($this->query); 
    //$this->result=sqlsrv_fetch_object($this->query);
    return ($this->result)?($this->result):false;
    }
    以下是提示信息resource(2) of type (SQL Server Statement) 
    resource(2) of type (Unknown)谢谢