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

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

        <legend id='D0c2m'><style id='D0c2m'><dir id='D0c2m'><q id='D0c2m'></q></dir></style></legend>
        • <bdo id='D0c2m'></bdo><ul id='D0c2m'></ul>
        <i id='D0c2m'><tr id='D0c2m'><dt id='D0c2m'><q id='D0c2m'><span id='D0c2m'><b id='D0c2m'><form id='D0c2m'><ins id='D0c2m'></ins><ul id='D0c2m'></ul><sub id='D0c2m'></sub></form><legend id='D0c2m'></legend><bdo id='D0c2m'><pre id='D0c2m'><center id='D0c2m'></center></pre></bdo></b><th id='D0c2m'></th></span></q></dt></tr></i><div id='D0c2m'><tfoot id='D0c2m'></tfoot><dl id='D0c2m'><fieldset id='D0c2m'></fieldset></dl></div>
      1. mysqli bind_param 给出错误:(1210) mysql_stmt_execute 的参

        时间:2023-09-24

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

        <legend id='ELJOh'><style id='ELJOh'><dir id='ELJOh'><q id='ELJOh'></q></dir></style></legend>
            <tbody id='ELJOh'></tbody>
          <tfoot id='ELJOh'></tfoot>

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

              • <bdo id='ELJOh'></bdo><ul id='ELJOh'></ul>
                  本文介绍了mysqli bind_param 给出错误:(1210) mysql_stmt_execute 的参数不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有这个完全相同的代码在另一台服务器上运行良好:

                  I have this exact same code working great on another server:

                  $mysqli_Cxn = new mysqli($SQL_HOST,$SQL_USER,$SQL_PASS,$SQL_DB);
                  if($mysqli_Cxn->connect_errno){
                  echo 'Unable to connect!!';
                  exit();
                  }
                  
                  $userID=12345;
                  $userFirstName = 'Charley';
                  $userLocale = 'en_US';
                  
                  $sql = "UPDATE userProfile SET userFirstName=?, userLocale=? WHERE id=?";
                  
                  if($stmt = $mysqli_Cxn->prepare($sql)){
                   if(!$stmt->bind_param('ssi',$userFirstName,$userLocale,$userID)){
                    echo "<br/><br/>Binding parameters failed: (" . $stmt->errno . ") " . $stmt->error;
                   }
                   if($stmt->execute()){
                    totalAffected=$stmt->affected_rows;
                    if($totalAffected>=1){
                     echo '<br/><br/>UPDATE OK: Affected rows = '. $totalAffected;
                    }
                   }else{
                    echo "Execute failed: (" . $stmt->errno . ") " . $stmt->error;
                   }
                  }
                  $stmt->close();
                  

                  该代码给了我以下输出:执行失败:(1210) mysql_stmt_execute 的参数不正确

                  That code gives me the following output: Execute failed: (1210) Incorrect arguments to mysql_stmt_execute

                  如果我改变这两行:

                  $sql = "UPDATE userProfile SET userFirstName=?, userLocale=? WHERE id=?";
                  $stmt->bind_param('ssi',$userFirstName,$userLocale,$userID);
                  

                  为此:

                  $sql = "UPDATE userProfile SET userFirstName=?, userLocale='en_US' WHERE id=12345";
                  $stmt->bind_param('s',$userFirstName);
                  

                  ...然后更新成功,我没有收到任何错误.

                  ...then the Update is successful and I don't get any error.

                  有谁知道为什么我不能在这段代码中绑定多个参数?

                  我让这段代码在 Centos 4.9、PHP 5.3.3、MySQL 5.0.91/5.0.91-community-log 上完美运行

                  I had this code running perfectly on a Centos 4.9, PHP 5.3.3, MySQL 5.0.91/5.0.91-community-log

                  我需要在我当前的服务器上运行它,它是 Centos 6.2、PHP 5.3.10、MySQL 5.0.95-community-log

                  I need to run it on my current server which is Centos 6.2, PHP 5.3.10, MySQL 5.0.95-community-log

                  推荐答案

                  我做了一点研究,结合您的 GCC 版本和您使用的优化标志,这似乎是 MySQL 源中报告的错误.如果您无法更改 MySQL 版本,请尝试重新编译 MySQL,并将 -fno-strict-aliasing 添加到您的 CFLAGS.

                  I did a little research, and it seems like a reported error in the MySQL source in combination with your version of GCC and the optimization flags you use. If you can't change the MySQL version, try recompile MySQL with added -fno-strict-aliasing to your CFLAGS.

                  参见 http://bugs.mysql.com/bug.php?id=48284 了解更多详情

                  这篇关于mysqli bind_param 给出错误:(1210) mysql_stmt_execute 的参数不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:mysqli 函数 bind_result、store_result 和 fetch 之间有什 下一篇:何时以及为何使用 mysqli_fetch_row、mysqli_fetch_obje

                  相关文章

                  最新文章

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

                    <tfoot id='o1Oky'></tfoot>

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

                    1. <small id='o1Oky'></small><noframes id='o1Oky'>