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

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

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

      如何在另一個(gè)查詢的 while 循環(huán)中運(yùn)行 sql 查詢

      How to run an sql query inside a while loop of another query(如何在另一個(gè)查詢的 while 循環(huán)中運(yùn)行 sql 查詢)

      <tfoot id='xb5rU'></tfoot>
      • <legend id='xb5rU'><style id='xb5rU'><dir id='xb5rU'><q id='xb5rU'></q></dir></style></legend>
          <bdo id='xb5rU'></bdo><ul id='xb5rU'></ul>

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

              <tbody id='xb5rU'></tbody>

            1. <i id='xb5rU'><tr id='xb5rU'><dt id='xb5rU'><q id='xb5rU'><span id='xb5rU'><b id='xb5rU'><form id='xb5rU'><ins id='xb5rU'></ins><ul id='xb5rU'></ul><sub id='xb5rU'></sub></form><legend id='xb5rU'></legend><bdo id='xb5rU'><pre id='xb5rU'><center id='xb5rU'></center></pre></bdo></b><th id='xb5rU'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xb5rU'><tfoot id='xb5rU'></tfoot><dl id='xb5rU'><fieldset id='xb5rU'></fieldset></dl></div>
                本文介紹了如何在另一個(gè)查詢的 while 循環(huán)中運(yùn)行 sql 查詢的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                當(dāng) photoId 直接在語句上而不是變量時(shí),以下工作完全沒有問題.

                The following works with no problem at all, when the photoId is directly on the statement and not a variable.

                $img_query = mysqli_query($con, 'SELECT * FROM imgs WHERE photoid = "103"') or die(mysqli_error($con));
                

                但是下面的操作不會(huì)出錯(cuò),可能是什么原因?qū)е聼o法選擇.

                but the following just won't work with no error, what might be causing this not to select.

                $imageid = '103';
                $img_query = mysqli_query($con, 'SELECT * FROM imgs WHERE photoid = "$imageid"') or die(mysqli_error($con));
                $img_row = mysqli_fetch_array($img_query);
                    echo $img_row['img'];
                

                這是一個(gè)while循環(huán).

                This is inside a while loop.

                while($row = mysqli_fetch_array($somequery)){
                 $imageid = $row['photoid'];
                    $img_query = mysqli_query($con, 'SELECT * FROM imgs WHERE photoid = "$imageid"') or die(mysqli_error($con));
                    $img_row = mysqli_fetch_array($img_query);
                        echo $img_row['img'];
                }
                

                謝謝.

                推薦答案

                在php中'"差別很大,查詢語法是雙引號(hào)左右變量周圍的查詢和單引號(hào)......盡管我建議您在查詢中使用參數(shù),而不是直接將變量放入查詢中

                in php a ' and a " are very different and the query syntax is double quote around the query and single quote around variables.. although I would recommend you look at using parameters on your query instead of just putting a variable directly into the query

                $imageid = '103';
                $query = $con->prepare("SELECT * FROM imgs WHERE photoid = ?");
                $query->bind_param('sssd', $imageid);
                $query->execute();
                

                這只是它的細(xì)節(jié)......如果你想了解更多關(guān)于連接的信息......錯(cuò)誤處理和其他一切閱讀DOCS

                this is just the nuts and bolts of it... if you want more information about the connection.. error handling and everything else read the DOCS

                這篇關(guān)于如何在另一個(gè)查詢的 while 循環(huán)中運(yùn)行 sql 查詢的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                MySQLi prepared statement amp; foreach loop(MySQLi準(zhǔn)備好的語句amp;foreach 循環(huán))
                Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?)
                PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無法識(shí)別登錄信息)
                mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個(gè)參數(shù))
                Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結(jié)果填充變量)
                MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“l(fā)ocalhost的訪問被拒絕)
                    • <bdo id='a8OyQ'></bdo><ul id='a8OyQ'></ul>

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

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

                        2. <i id='a8OyQ'><tr id='a8OyQ'><dt id='a8OyQ'><q id='a8OyQ'><span id='a8OyQ'><b id='a8OyQ'><form id='a8OyQ'><ins id='a8OyQ'></ins><ul id='a8OyQ'></ul><sub id='a8OyQ'></sub></form><legend id='a8OyQ'></legend><bdo id='a8OyQ'><pre id='a8OyQ'><center id='a8OyQ'></center></pre></bdo></b><th id='a8OyQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='a8OyQ'><tfoot id='a8OyQ'></tfoot><dl id='a8OyQ'><fieldset id='a8OyQ'></fieldset></dl></div>
                        3. <small id='a8OyQ'></small><noframes id='a8OyQ'>

                            <tbody id='a8OyQ'></tbody>
                        4. 主站蜘蛛池模板: 国产一级免费在线观看 | 99热热精品 | 国产精品久久网 | 欧美舔穴| 日韩午夜在线观看 | 日韩一区二区三区视频在线观看 | 国产精品99久久久久 | 日本一区二区高清不卡 | 成人精品久久 | 国产精品久久久 | 九九热在线免费视频 | 高清人人天天夜夜曰狠狠狠狠 | 亚洲精品自在在线观看 | 成人午夜免费福利视频 | 国产精品久久久久久久久久久久久 | 99热视 | 免费成人高清 | 久久久久一区 | 色爱综合网 | 国产探花在线观看视频 | 九九热这里 | 九九伊人sl水蜜桃色推荐 | 欧美日韩不卡合集视频 | 久久精品一区二 | 国产精品国产a级 | av在线免费观看网址 | 亚洲国产精品成人无久久精品 | 日韩一级免费电影 | 国产午夜精品一区二区三区在线观看 | 国产精品免费小视频 | 亚洲二区视频 | 一级片av| 国产福利在线 | 久久精品| 亚洲精品欧美 | 亚洲区一 | 丁香五月网久久综合 | 久久小视频| 欧美日韩一区二区三区四区 | 国产精品网址 | 一区二区免费高清视频 |