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

      <bdo id='CtPCO'></bdo><ul id='CtPCO'></ul>
  • <tfoot id='CtPCO'></tfoot>

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

      1. <i id='CtPCO'><tr id='CtPCO'><dt id='CtPCO'><q id='CtPCO'><span id='CtPCO'><b id='CtPCO'><form id='CtPCO'><ins id='CtPCO'></ins><ul id='CtPCO'></ul><sub id='CtPCO'></sub></form><legend id='CtPCO'></legend><bdo id='CtPCO'><pre id='CtPCO'><center id='CtPCO'></center></pre></bdo></b><th id='CtPCO'></th></span></q></dt></tr></i><div id='CtPCO'><tfoot id='CtPCO'></tfoot><dl id='CtPCO'><fieldset id='CtPCO'></fieldset></dl></div>
      2. 插入 - 绑定变量的数量与准备好的语句中的字段数量不匹配

        时间:2023-10-30

              <tbody id='UfeB4'></tbody>
          1. <small id='UfeB4'></small><noframes id='UfeB4'>

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

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

                  本文介绍了插入 - 绑定变量的数量与准备好的语句中的字段数量不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I'm getting:

                  Warning: mysqli_stmt::bind_result(): Number of bind variables doesn't match number of fields in prepared statement in E:XAMPPhtdocsaccountlib egister.php on line 73

                  When I use this code:

                  if($stmt = $conn -> prepare("INSERT INTO login(user, pass) VALUES(?, ?)")) {
                  
                    /* Bind parameters s - string, b - blob, i - int, etc */
                    $stmt -> bind_param("ss", $user, $pw);
                  
                    /* Execute it */
                    $stmt -> execute();
                  
                    /* Bind results */
                    $stmt -> bind_result($user, $pw);
                  
                    /* Close statement */
                    $stmt -> close();
                    $userId = $conn->insert_id;
                  } 
                  

                  I can't understand, why this happens every time, what is wrong in my code snippet?

                  解决方案

                  You are attempting to bind_result on a statement that is not returning any results.

                  Remove this line. $stmt -> bind_result($user, $pw);

                  这篇关于插入 - 绑定变量的数量与准备好的语句中的字段数量不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:不正确的整数(2147483647)被插入到 MySQL 中? 下一篇:在页面加载时插入查询,插入两次?

                  相关文章

                  <i id='gAySq'><tr id='gAySq'><dt id='gAySq'><q id='gAySq'><span id='gAySq'><b id='gAySq'><form id='gAySq'><ins id='gAySq'></ins><ul id='gAySq'></ul><sub id='gAySq'></sub></form><legend id='gAySq'></legend><bdo id='gAySq'><pre id='gAySq'><center id='gAySq'></center></pre></bdo></b><th id='gAySq'></th></span></q></dt></tr></i><div id='gAySq'><tfoot id='gAySq'></tfoot><dl id='gAySq'><fieldset id='gAySq'></fieldset></dl></div>
                  1. <tfoot id='gAySq'></tfoot>
                  2. <small id='gAySq'></small><noframes id='gAySq'>

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

                      <bdo id='gAySq'></bdo><ul id='gAySq'></ul>