久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    • <bdo id='jkYsR'></bdo><ul id='jkYsR'></ul>
    <i id='jkYsR'><tr id='jkYsR'><dt id='jkYsR'><q id='jkYsR'><span id='jkYsR'><b id='jkYsR'><form id='jkYsR'><ins id='jkYsR'></ins><ul id='jkYsR'></ul><sub id='jkYsR'></sub></form><legend id='jkYsR'></legend><bdo id='jkYsR'><pre id='jkYsR'><center id='jkYsR'></center></pre></bdo></b><th id='jkYsR'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jkYsR'><tfoot id='jkYsR'></tfoot><dl id='jkYsR'><fieldset id='jkYsR'></fieldset></dl></div>

      <small id='jkYsR'></small><noframes id='jkYsR'>

    1. <legend id='jkYsR'><style id='jkYsR'><dir id='jkYsR'><q id='jkYsR'></q></dir></style></legend>

      1. <tfoot id='jkYsR'></tfoot>
      2. 警告問題:期望參數 1 為 mysqli_result

        warning problem: expects parameter 1 to be mysqli_result(警告問題:期望參數 1 為 mysqli_result)

          <small id='VS3pb'></small><noframes id='VS3pb'>

            <bdo id='VS3pb'></bdo><ul id='VS3pb'></ul>
            1. <tfoot id='VS3pb'></tfoot>
              • <i id='VS3pb'><tr id='VS3pb'><dt id='VS3pb'><q id='VS3pb'><span id='VS3pb'><b id='VS3pb'><form id='VS3pb'><ins id='VS3pb'></ins><ul id='VS3pb'></ul><sub id='VS3pb'></sub></form><legend id='VS3pb'></legend><bdo id='VS3pb'><pre id='VS3pb'><center id='VS3pb'></center></pre></bdo></b><th id='VS3pb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='VS3pb'><tfoot id='VS3pb'></tfoot><dl id='VS3pb'><fieldset id='VS3pb'></fieldset></dl></div>

              • <legend id='VS3pb'><style id='VS3pb'><dir id='VS3pb'><q id='VS3pb'></q></dir></style></legend>

                    <tbody id='VS3pb'></tbody>
                  本文介紹了警告問題:期望參數 1 為 mysqli_result的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我收到下面列出的警告,我想知道如何修復它

                  I get the following warning listed below and I was wondering how do I fix it

                  Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given on line 65
                  

                  代碼圍繞下面列出的 PHP 代碼部分.如果需要,我可以列出完整的代碼.

                  The code is around this section of PHP code listed below. I can list the full code if needed.

                  // function to retrieve average and votes
                  function getRatingText(){
                      $dbc = mysqli_connect ("localhost", "root", "", "sitename");
                      $sql1 = "SELECT COUNT(*) 
                               FROM articles_grades 
                               WHERE users_articles_id = '$page'";
                  
                      $result = mysqli_query($dbc,$sql1);
                      $total_ratings = mysqli_fetch_array($result);
                  
                      $sql2 = "SELECT COUNT(*) 
                               FROM grades 
                               JOIN grades ON grades.id = articles_grades.grade_id
                               WHERE articles_grades.users_articles_id = '$page'";
                  
                      $result = mysqli_query($dbc,$sql2);
                      $total_rating_points = mysqli_fetch_array($result);
                      if (!empty($total_rating_points) && !empty($total_ratings)){
                          $avg = (round($total_rating_points / $total_ratings,1));
                          $votes = $total_ratings;
                          echo $avg . "/10  (" . $votes . " votes cast)";
                      } else {
                          echo '(no votes cast)';
                      }
                  }
                  

                  推薦答案

                  mysqli_query() 如果查詢中有錯誤,則返回 FALSE.所以你應該測試一下...

                  mysqli_query() returns FALSE if there was an error in the query. So you should test for it...

                  /* Select queries return a resultset */
                  if ($result = mysqli_query($dbc, "SELECT Name FROM City LIMIT 10")) {
                      printf("Select returned %d rows.
                  ", $result->num_rows);
                  
                      /* free result set */
                      $result->close();
                  }
                  

                  請參閱此鏈接以獲取 mysqli_query 參考http://php.net/manual/en/mysqli.query.php

                  See this link for the mysqli_query reference http://php.net/manual/en/mysqli.query.php

                  這篇關于警告問題:期望參數 1 為 mysqli_result的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                  Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                  PHP Prepared Statement Problems(PHP 準備好的語句問題)
                  mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                  PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                  How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)
                  <tfoot id='bc7gc'></tfoot>
                      <tbody id='bc7gc'></tbody>
                    <i id='bc7gc'><tr id='bc7gc'><dt id='bc7gc'><q id='bc7gc'><span id='bc7gc'><b id='bc7gc'><form id='bc7gc'><ins id='bc7gc'></ins><ul id='bc7gc'></ul><sub id='bc7gc'></sub></form><legend id='bc7gc'></legend><bdo id='bc7gc'><pre id='bc7gc'><center id='bc7gc'></center></pre></bdo></b><th id='bc7gc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='bc7gc'><tfoot id='bc7gc'></tfoot><dl id='bc7gc'><fieldset id='bc7gc'></fieldset></dl></div>

                  • <legend id='bc7gc'><style id='bc7gc'><dir id='bc7gc'><q id='bc7gc'></q></dir></style></legend>

                      <small id='bc7gc'></small><noframes id='bc7gc'>

                        <bdo id='bc7gc'></bdo><ul id='bc7gc'></ul>
                          1. 主站蜘蛛池模板: www.一区二区三区.com | 欧美成人a∨高清免费观看 91伊人 | 久草热线 | 亚洲伊人久久综合 | 亚洲一二三区av | 日本特黄a级高清免费大片 成年人黄色小视频 | 欧美韩一区二区三区 | 久久久久网站 | 午夜精品一区 | 国产高清性xxxxxxxx | 亚洲福利一区二区 | 欧美一级做性受免费大片免费 | 久久久久久免费毛片精品 | 国产精品99久久久久久www | 日韩中文一区二区 | 国产免费国产 | 日本一区二区三区在线观看 | 自拍亚洲 | 国产毛片久久久 | 亚洲一区二区三区四区五区中文 | 天堂中文av| 99热都是精品 | 亚洲风情在线观看 | 免费视频一区二区三区在线观看 | 中文字幕在线一区二区三区 | 国产精品一区二区无线 | 性一交一乱一透一a级 | 国产成人叼嘿视频在线观看 | 欧美精品综合在线 | 国产美女久久久 | 久久精品亚洲一区二区三区浴池 | 日本久久精品 | 91 久久| 国产伦精品一区二区三毛 | 国产成人久久精品一区二区三区 | av色站| 99久久久国产精品 | 日日噜噜噜夜夜爽爽狠狠视频, | 日韩欧美国产精品一区二区 | 成人国产在线视频 | 国产男人的天堂 |