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

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

        单值 Mysqli

        时间:2023-07-31
        <tfoot id='Kjinn'></tfoot>

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

            <legend id='Kjinn'><style id='Kjinn'><dir id='Kjinn'><q id='Kjinn'></q></dir></style></legend>

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

                  <tbody id='Kjinn'></tbody>
                  本文介绍了单值 Mysqli的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试编写一个函数,该函数将使用 mysqli 检查数据库中的单个值,而不必将其放入数组中.除了我已经在这里做的事情,我还能做什么?

                  I am trying to write a function that will check for a single value in the db using mysqli without having to place it in an array. What else can I do besides what I am already doing here?

                  function getval($query){
                      $mysqli = new mysqli();
                      $mysqli->connect(HOST, USER, PASS, DB);
                      $result = $mysqli->query($query);
                      $value = $mysqli->fetch_array;
                      $mysqli->close();
                      return $value;
                  }
                  

                  推荐答案

                  怎么样

                  $name = $mysqli->query("SELECT name FROM contacts WHERE id = 5")->fetch_object()->name; 
                  

                  这篇关于单值 Mysqli的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:使用一个具有可变数量的输入变量的 bind_param() 下一篇:如何从准备好的语句中获取 assoc 数组中的所有内

                  相关文章

                  最新文章

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

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

                    • <bdo id='WBZAX'></bdo><ul id='WBZAX'></ul>
                  1. <tfoot id='WBZAX'></tfoot>

                      <legend id='WBZAX'><style id='WBZAX'><dir id='WBZAX'><q id='WBZAX'></q></dir></style></legend>