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

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

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

    2. <tfoot id='ICjNh'></tfoot>

        • <bdo id='ICjNh'></bdo><ul id='ICjNh'></ul>

        mysqli bind_param() 致命错误

        时间:2023-07-29
            <tbody id='oMlAc'></tbody>
        • <legend id='oMlAc'><style id='oMlAc'><dir id='oMlAc'><q id='oMlAc'></q></dir></style></legend>
        • <small id='oMlAc'></small><noframes id='oMlAc'>

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

                <tfoot id='oMlAc'></tfoot>
                  <bdo id='oMlAc'></bdo><ul id='oMlAc'></ul>
                  本文介绍了mysqli bind_param() 致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我的代码有错误有人可以帮助我吗?

                  I Have an Error at my Code could someone help me?

                  <?php
                    $db = new mysqli("localhost","root","","karmintalender");
                  
                    $owner_ID = 1;
                  
                    $sql = "SELECT name, kalender_ID FROM kalender WHERE ersteller_ID = ?";
                    $stmt = $db->prepare($sql);
                    $stmt->bind_param("i", $owner_ID);
                    $stmt->execute();
                    $stmt->bind_results($name, $kalender_ID);
                  
                    while ($stmt->fetch()) {
                      echo $name . " " . $kalender_ID;
                    }
                  ?>
                  

                  当我打开它时,这个错误出现致命错误:在第 8 行的 G:xampphtdocsKarmintalender est.php 中的非对象上调用成员函数 bind_param()"

                  When I open it this error appears "Fatal error: Call to a member function bind_param() on a non-object in G:xampphtdocsKarmintalender est.php on line 8"

                  推荐答案

                  您在此行中的一个字段不存在,请检查它们.

                  One of your fields on this line doesn't exist,check them.

                  $sql = "SELECT name, kalender_ID FROM kalender WHERE ersteller_ID = ?";
                  

                  此外,您应该检查 $stmt.

                  Also, you should be checking for $stmt.

                  $db = new mysqli("localhost","root","","karmintalender");
                  
                   $owner_ID = 1;
                  
                   $sql = "SELECT name, kalender_ID FROM kalender WHERE ersteller_ID = ?";
                   $stmt = $db->prepare($sql);
                   if($stmt){
                       $stmt->bind_param("i", $owner_ID);
                       $stmt->execute();
                       $stmt->bind_results($name, $kalender_ID);
                  
                       while ($stmt->fetch()) {
                         echo $name . " " . $kalender_ID;
                       }
                   }
                  

                  这篇关于mysqli bind_param() 致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:简化:mysqli num_rows 不工作 下一篇:获取关联数组时如何消除致命错误

                  相关文章

                  最新文章

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

                      <tfoot id='LuSIO'></tfoot>
                    1. <small id='LuSIO'></small><noframes id='LuSIO'>

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