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

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

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

        在非对象 MySQLi 上调用成员函数 bind_param()

        时间:2023-07-30

      1. <small id='38ZKa'></small><noframes id='38ZKa'>

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

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

                  <tfoot id='38ZKa'></tfoot>
                    <tbody id='38ZKa'></tbody>
                  本文介绍了在非对象 MySQLi 上调用成员函数 bind_param()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  好的,所以我正在尝试更新博客条目,当我尝试运行脚本时,我正在调用非对象上的成员函数 bind_param().我已经做了大量的研究,想看看我是否可以自己修复它,但我一定遗漏了一些东西.

                  Okay, so I'm trying to update a blog entry, and I'm getting Call to a member function bind_param() on a non-object when I try to run the script. I have done extensive research to see if I could fix it myself, but I must be missing something.

                  <?php
                  $stmt = $mysqli->prepare("UPDATE blogentries SET 
                    headline = ?, 
                     image = ?, 
                     caption = ?,  
                     article = ?
                      WHERE id = ?");
                  $stmt->bind_param('ssssi',
                     $_POST['headline'],
                     $_POST['image'],
                     $_POST['caption'],
                     $_POST['article'],
                     $_POST['id']);
                  $stmt->execute(); 
                  $stmt->close();
                  
                  ?>
                  

                  提前致谢,

                  奥斯汀

                  更新:这是数据库连接

                  我添加了额外的 $mysqli 连接用于调试目的,即使没有它也会发生错误.

                  I added the extra $mysqli connection for debugging purposes, and the error occurs even without it.

                  推荐答案

                  $stmt 可能是 false.

                  if ($stmt = $mysqli->prepare(...)) {
                      $stmt->bind_param(...);
                      ...
                  }
                  else {
                      printf("Errormessage: %s
                  ", $mysqli->error);
                  }
                  

                  这篇关于在非对象 MySQLi 上调用成员函数 bind_param()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:何时调用 mysqli::close 下一篇:php, mysqli-stmt.bind-param]:类型定义字符串中的元素数

                  相关文章

                  最新文章

                • <tfoot id='iIamu'></tfoot>
                • <small id='iIamu'></small><noframes id='iIamu'>

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

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