<legend id='Z6qQJ'><style id='Z6qQJ'><dir id='Z6qQJ'><q id='Z6qQJ'></q></dir></style></legend>
    <bdo id='Z6qQJ'></bdo><ul id='Z6qQJ'></ul>

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

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

    1. <tfoot id='Z6qQJ'></tfoot>

        INSERT 查询产生“警告:mysqli_num_rows() 期望参数 1

        时间:2023-07-30
        <i id='Vjs3u'><tr id='Vjs3u'><dt id='Vjs3u'><q id='Vjs3u'><span id='Vjs3u'><b id='Vjs3u'><form id='Vjs3u'><ins id='Vjs3u'></ins><ul id='Vjs3u'></ul><sub id='Vjs3u'></sub></form><legend id='Vjs3u'></legend><bdo id='Vjs3u'><pre id='Vjs3u'><center id='Vjs3u'></center></pre></bdo></b><th id='Vjs3u'></th></span></q></dt></tr></i><div id='Vjs3u'><tfoot id='Vjs3u'></tfoot><dl id='Vjs3u'><fieldset id='Vjs3u'></fieldset></dl></div>

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

            <legend id='Vjs3u'><style id='Vjs3u'><dir id='Vjs3u'><q id='Vjs3u'></q></dir></style></legend>
                  <tbody id='Vjs3u'></tbody>
                  <bdo id='Vjs3u'></bdo><ul id='Vjs3u'></ul>
                  <tfoot id='Vjs3u'></tfoot>

                • 本文介绍了INSERT 查询产生“警告:mysqli_num_rows() 期望参数 1 为 mysqli_result,给出布尔值";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我对收到以下消息的原因感到困惑:

                  I am confused about why I am received the following message:

                  mysqli_num_rows() 期望参数 1 是 mysqli_result,给定布尔值

                  mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given

                  这个问题与之前的查询不同,因为我的查询实际上正确执行(值确实输入到数据库中).因此,我希望 MySQL 返回结果集而不是布尔值.

                  This question is different from previous queries because my query actually executes correctly (values were indeed entered into the database). So, I would expect MySQL to return a result set and NOT A BOOLIAN.

                  以下是我的功能:

                  function join_main_newsletter($firstName = null, $email)
                  {
                      global $dbc;
                      $valuesEntered = "values entered";
                  
                      $insert = "INSERT INTO newsletter (first_name, email ) VALUES ('name', 'testemail@yahoo.com')";
                  
                      $R3 = mysqli_query($dbc, $insert) or trigger_error("Query Failed! SQL: $sql - Error: " . mysqli_error(db_conx), E_USER_ERROR);
                      if (mysqli_num_rows($R3) == 1) {
                          return $valueentered;
                      } else {
                      }
                  }
                  

                  这是错误结果的一部分:

                  [valuesEntered] => values entered
                      [insert] => INSERT INTO newsletter (first_name, email ) 
                                    VALUES ('name', 'testemail@yahoo.com')
                      [R3] => 1
                  

                  推荐答案

                  mysqli_num_rows() 函数返回结果集中的行数.对于插入、更新和删除使用 mysqli_affected_rows

                  The mysqli_num_rows() function returns the number of rows in a result set. For insert, update and delete use mysqli_affected_rows

                  这篇关于INSERT 查询产生“警告:mysqli_num_rows() 期望参数 1 为 mysqli_result,给出布尔值";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:准备好的陈述 - 它们是否必要 下一篇:警告:mysqli_query() 需要至少 2 个参数,1 个给定.什

                  相关文章

                  最新文章

                  <legend id='QdZoi'><style id='QdZoi'><dir id='QdZoi'><q id='QdZoi'></q></dir></style></legend>

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

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

                    1. <tfoot id='QdZoi'></tfoot>