<tfoot id='yS9Xg'></tfoot>

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

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

        Fatal error: Call to a member function fetch_assoc() on a no

        业务场景:使用update语句去更新数据库字段。 原因:update接收值不正确。原来代码: $query = "UPDATE student SET date = now() WHERE id = $id";$result = $mysqli-query($query2) or die($mysqli-error); // 问题出现了在这句 $data = $result-fetch_ass

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

                  <tbody id='58kHl'></tbody>
                <legend id='58kHl'><style id='58kHl'><dir id='58kHl'><q id='58kHl'></q></dir></style></legend>
                  <bdo id='58kHl'></bdo><ul id='58kHl'></ul>

                  <small id='58kHl'></small><noframes id='58kHl'>

                  业务场景:使用update语句去更新数据库字段。

                  原因:update接收值不正确。原来代码:

                  $query = "UPDATE student SET date = now() WHERE id = $id";
                  $result = $mysqli->query($query2) or die($mysqli->error); // 问题出现了在这句  
                  $data = $result->fetch_assoc();
                  
                    if ($data) {
                        $ary = array('data' => '', 'msg' => '更新成功', 'status' => '0');
                    } else {
                        $ary = array('data' => '', 'msg' => '更新失败', 'status' => '1');
                    }
                    exit(JSON($ary));
                  修改后的代码:
                  $query = "UPDATE student SET date = now() WHERE id = $id";
                  $result = $mysqli->query($query2); // 把or die($mysqli->error)删了
                  $data = $result->fetch_assoc();
                    if ($data) {
                        $ary = array('data' => '', 'msg' => '更新成功', 'status' => '0');
                    } else {
                        $ary = array('data' => '', 'msg' => '更新失败', 'status' => '1');
                    }
                    exit(JSON($ary));
                  问题就出在or die($mysqli->error)这里。
                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  在Layui中,如果你想设置日期时间选择器(datetime)的默认结束时间为当天的23:59:59,你可以使用如下代码: laydate.render({ elem: '#test10' ,type: 'datetime' ,range: true ,max: '{:date("Y-m-d 23:59:59")}' ,ready: function(date){ $(".layui-laydat
                  Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                  Rails 3.1 ajax:success handling(Rails 3.1 ajax:成功处理)
                  ExecJS::ProgramError: SyntaxError: Reserved word quot;functionquot;(ExecJS::ProgramError: SyntaxError: 保留字“function)
                  Node.js: Configuration and routes in a different file(Node.js:不同文件中的配置和路由)
                  AngularJS Error: Unknown provider: aProvider lt;- a(AngularJS 错误:未知提供者:aProvider lt;- a)

                        <tbody id='oKEye'></tbody>

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

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

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