久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='0CC8s'></small><noframes id='0CC8s'>

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

    <tfoot id='0CC8s'></tfoot>

        • <bdo id='0CC8s'></bdo><ul id='0CC8s'></ul>

      1. mysqli_query() 總是返回真

        mysqli_query() always return true(mysqli_query() 總是返回真)

        • <tfoot id='wIX9K'></tfoot>

            <tbody id='wIX9K'></tbody>

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

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

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

                  <i id='wIX9K'><tr id='wIX9K'><dt id='wIX9K'><q id='wIX9K'><span id='wIX9K'><b id='wIX9K'><form id='wIX9K'><ins id='wIX9K'></ins><ul id='wIX9K'></ul><sub id='wIX9K'></sub></form><legend id='wIX9K'></legend><bdo id='wIX9K'><pre id='wIX9K'><center id='wIX9K'></center></pre></bdo></b><th id='wIX9K'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wIX9K'><tfoot id='wIX9K'></tfoot><dl id='wIX9K'><fieldset id='wIX9K'></fieldset></dl></div>
                  本文介紹了mysqli_query() 總是返回真的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這是我的表格:

                  <!DOCTYPE html>
                  <html>
                    <head>
                    </head>
                    <body>
                      <form action="register_ajax.php" method="get">
                      <input type="text" name="email">
                      <input type="submit" value="test">
                      </form>
                    </body>
                  </html>
                  

                  這是我的php代碼:

                  <?php
                      $dbc = mysqli_connect("localhost","root","*******","continental_tourism") OR die(mysqli_connect_error());
                      $email = $_GET['email'];
                      $query = "SELECT email FROM customer_info WHERE email = '$email' ";
                      $r = mysqli_query($dbc, $query) OR die(mysqli_error($dbc));
                      if($r)
                          echo "Email address exists!";
                      else
                          echo "sss";
                  ?>
                  

                  如果我輸入正確的(db 上的現有電子郵件)$r 為真.但是如果我輸入不存在的電子郵件,那么 $r 也是如此.這是為什么?基本上我想檢測空集.我該怎么做?

                  If I enter a correct(Existing email on db) $r is true. But if I enter non existing email, then also $r is true. Why is that? Basically I want to detect the empty set. How can I do it?

                  謝謝!

                  推薦答案

                  $r 只有在出現 SQL 錯誤時才會為假.否則它將始終返回一個對象,即使您的 SELECT 語句沒有返回任何行.

                  $r will only be false if there was SQL error. Otherwise it will always return an object, even if no rows are returned by your SELECT statement.

                  使用mysqli_num_rows() 計算返回的行數.零表示沒有人使用該電子郵件地址.

                  Use mysqli_num_rows() to count how many rows are returned. Zero means no one is using that email address.

                  if(mysqli_num_rows($r))
                      echo "Email address exists!";
                  else
                      echo "sss"; 
                  

                  這篇關于mysqli_query() 總是返回真的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                  Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                  PHP Prepared Statement Problems(PHP 準備好的語句問題)
                  mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                  PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                  How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)

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

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

                      1. <tfoot id='GiNkR'></tfoot>

                            <tbody id='GiNkR'></tbody>

                            主站蜘蛛池模板: 亚洲精品视频在线看 | 欧美成人第一页 | 欧美精品一区二区三区在线播放 | 天天综合久久 | 精品二区 | 亚洲天堂影院 | 日韩久久网 | 欧美精品一区二区三区在线四季 | 色毛片 | 亚洲精品一区av在线播放 | 成人免费激情视频 | 亚洲成人综合网站 | www.日本在线观看 | 岛国视频| 99久久久国产精品 | 国产精品高潮呻吟久久 | 1204国产成人精品视频 | 人人干人人爽 | 久久精品| 国产精品一区二区精品 | 国产美女精品视频 | 国产精品无码久久久久 | 欧美精品综合在线 | 日韩成人在线观看 | 成人精品一区二区三区中文字幕 | 二区不卡 | 亚洲精品第一 | 懂色中文一区二区在线播放 | 青青久久av北条麻妃海外网 | 久久精品黄色 | 亚洲精品99| 国产精品免费视频一区 | 国产毛片av | 国产九九av | 亚洲视频免费观看 | 91久久综合亚洲鲁鲁五月天 | 久久久国产网站 | 99pao成人国产永久免费视频 | 中文字幕在线免费视频 | 91久久| 日日干夜夜操 |