• <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. 插入 - 绑定变量的数量与准备好的语句中的字段数量不匹配

        INSERT - Number of bind variables doesn#39;t match number of fields in prepared statement(插入 - 绑定变量的数量与准备好的语句中的字段数量不匹配)

              <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);

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Laravel 4 - Connect to other database(Laravel 4 - 连接到其他数据库)
                  Call external API function from controller, LARAVEL 4(从控制器调用外部 API 函数,LARAVEL 4)
                  Empty string instead of null values Eloquent(空字符串而不是空值 Eloquent)
                  quot;laravel.logquot; could not be opened: failed to open stream(“laravel.log无法打开:无法打开流)
                  Displaying the Error Messages in Laravel after being Redirected from controller(从控制器重定向后在 Laravel 中显示错误消息)
                  Laravel Creating Dynamic Routes to controllers from Mysql database(Laravel 从 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>
                    <tbody id='gAySq'></tbody>
                  1. <tfoot id='gAySq'></tfoot>
                    • <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>