Mozila和Chrome的隐身标签页上的MySQL错误

时间:2018-08-15 17:01:02

标签: php mysql google-chrome mozilla

我正在从数据库中检索数据,如下所示:

    class myClass extendes Model {
       public function mainFunc() {      
          $ids = getData(123);
          return $ids;

       }






    public function getData($param) {
          $fields = "t1.fieldA, t1.fieldB";
          $from = "tableA t1
                   JOIN DB2.tableB t2 USING(fieldC)
                   JOIN DB3.tableD t3 USING(fieldB)
                   JOIN DB3.tableE t4 ON t4.fieldz = t3.field_z
                   JOIN tableF t4 USING(fieldE)";
          $where = "t1.field_id = " . $param;            
          $result = $this->select($fields, $from, $where);
          $data = array();
          while($row = mysqli_fetch_assoc($result)) {
             $data[] = $row;
          }
          return $data;
       } 
}

这就是发生的事情:

  • 在chrome,常规选项卡和JSONView扩展名上:除返回null的单行中的单个字段之外,其他都正常工作
  • 在chrome上,隐身标签页上没有扩展名,它不起作用并显示以下错误:

      

    警告:mysqli_fetch_assoc()期望参数1为mysqli_result(给定布尔值)。

  • Mozilla Firefox(无扩展名):

      

    SyntaxError:JSON.parse:JSON数据第2行第1列的意外字符

    • 在DBManager,DBeaver上一切正常。

我不知道是什么原因造成的。我什至不知道该怎么调整和测试。

0 个答案:

没有答案