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

        检查 mysqli_query 是否返回任何值?

        时间:2023-09-24

                <tbody id='8VmLy'></tbody>
              <tfoot id='8VmLy'></tfoot>
            • <legend id='8VmLy'><style id='8VmLy'><dir id='8VmLy'><q id='8VmLy'></q></dir></style></legend>
                <bdo id='8VmLy'></bdo><ul id='8VmLy'></ul>

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

                  本文介绍了检查 mysqli_query 是否返回任何值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有以下代码,我想知道 mysqli_query 是否返回任何行,如果返回则返回错误.

                  I have the following code and I would like to know if mysqli_query returned any rows and if so return an error.

                  $result = mysqli_query($connection, "SELECT * FROM users");
                      
                  if ($result == "") {
                      echo "No records found";
                  } else {
                      echo "There is at least one record in the database";
                  }
                  

                  如果结果返回为空,我就会遇到麻烦.我已经尝试使用了几种东西,但如果没有找到任何东西,我无法弄清楚如何让它正常工作.

                  I'm having trouble if the results come back as empty. I've tried using several things and can't figure out how to get it work correctly if nothing is found.

                  推荐答案

                  使用 mysqli_num_rows 检查是否有任何行返回.

                  Use mysqli_num_rows to check if any rows were returned or not.

                  这篇关于检查 mysqli_query 是否返回任何值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:创建一个全局可访问的 MySQLi 对象 下一篇:如何判断列是否是使用 mysqli 的主键?

                  相关文章

                  最新文章

                2. <small id='yFeYH'></small><noframes id='yFeYH'>

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

                      • <bdo id='yFeYH'></bdo><ul id='yFeYH'></ul>
                      <tfoot id='yFeYH'></tfoot>

                    1. <legend id='yFeYH'><style id='yFeYH'><dir id='yFeYH'><q id='yFeYH'></q></dir></style></legend>