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

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

    • <bdo id='X4OiP'></bdo><ul id='X4OiP'></ul>

      1. <legend id='X4OiP'><style id='X4OiP'><dir id='X4OiP'><q id='X4OiP'></q></dir></style></legend>
      2. <small id='X4OiP'></small><noframes id='X4OiP'>

      3. mysqli_real_escape_string() 期望參數(shù) 1 是 mysqli,布爾值

        mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given set(mysqli_real_escape_string() 期望參數(shù) 1 是 mysqli,布爾值給定集合)
      4. <small id='PlhTH'></small><noframes id='PlhTH'>

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

                <tbody id='PlhTH'></tbody>

                1. <tfoot id='PlhTH'></tfoot>
                  <i id='PlhTH'><tr id='PlhTH'><dt id='PlhTH'><q id='PlhTH'><span id='PlhTH'><b id='PlhTH'><form id='PlhTH'><ins id='PlhTH'></ins><ul id='PlhTH'></ul><sub id='PlhTH'></sub></form><legend id='PlhTH'></legend><bdo id='PlhTH'><pre id='PlhTH'><center id='PlhTH'></center></pre></bdo></b><th id='PlhTH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='PlhTH'><tfoot id='PlhTH'></tfoot><dl id='PlhTH'><fieldset id='PlhTH'></fieldset></dl></div>
                  本文介紹了mysqli_real_escape_string() 期望參數(shù) 1 是 mysqli,布爾值給定集合的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我收到很多錯(cuò)誤,例如:mysqli_real_escape_string() 期望參數(shù) 1 為 mysqli,給出布爾值

                  I get a lot of errors like: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given

                  錯(cuò)誤是 mysqli_real_escape_string() 需要 2 個(gè)參數(shù),但只有 1 個(gè)項(xiàng)目需要更新.

                  The errors are that the mysqli_real_escape_string() expects 2 parameters but there is only 1 item that needs to be updated.

                  問(wèn)題出在這里:

                  $updatequery = "
                      UPDATE
                          as_comprofiler
                      SET
                          cb_empstatustime = '".time()."'
                          , cb_profiel = '".mysqli_real_escape_string($value->profile->nickname)."'
                          , cb_empstatus = '".mysqli_real_escape_string($cb_empstatus)."'
                          , cb_taal = '".mysqli_real_escape_string($talen)."'
                          , cb_sms = '".mysqli_real_escape_string($sms)."'
                      WHERE
                          cb_boxnr = '".mysqli_real_escape_string($value->boxnumber)."'
                      "; 
                  

                  以及頁(yè)面的完整部分:

                  // elke ***
                  foreach ($xml->consultant as $value) {
                  
                      // $cb_empstatus vullen a.d.h.v activated en callstatus
                      if ($value->activated == 0) {
                          $cb_empstatus = 'Afwezig';
                      } elseif ($value->activated == 1) {
                          if ($value->callstatus == 0) {
                              $cb_empstatus = 'Beschikbaar';
                          } elseif ($value->callstatus == 1) {
                              $cb_empstatus = 'Bezet';
                          } elseif ($value->callstatus == 2) {
                              $cb_empstatus = 'Pauze';
                          }
                      }
                  
                      // lege variabele aanmaken
                      $talen = '';
                      $sep = '';
                  
                      foreach ($value->languages->language as $taal) {
                          $talen .= $sep;
                          $talen .= $taal;
                          $sep = '|*|';
                      }
                  
                      // sms code omzetten naar tekst
                      if ($value->smsavailable == 1) {
                          $sms = 'Ja';
                      } else {
                          $sms = 'Nee';
                      }
                  
                      // de update query
                      $updatequery = "
                          UPDATE
                              as_comprofiler
                          SET
                              cb_empstatustime = '".time()."'
                              , cb_profiel = '".mysqli_real_escape_string($value->profile->nickname)."'
                              , cb_empstatus = '".mysqli_real_escape_string($cb_empstatus)."'
                              , cb_taal = '".mysqli_real_escape_string($talen)."'
                              , cb_sms = '".mysqli_real_escape_string($sms)."'
                          WHERE
                              cb_boxnr = '".mysqli_real_escape_string($value->boxnumber)."'
                          ";
                  
                      if (mysqli_query($updatequery) == false) {
                          // foutmelding
                          echo 'Niet uitgevoerd:<br>'.$updatequery.'<br><br>';
                      }
                  

                  有人有想法嗎?

                  推薦答案

                  你必須添加 mysqli 連接器 作為 mysqli_real_escape_string() 函數(shù)中的第一個(gè)參數(shù).并且要轉(zhuǎn)義的字符串設(shè)置為第二個(gè)參數(shù).

                  You have to add mysqli connector as 1st parameter in mysqli_real_escape_string() function. And the string to be escaped set as 2nd parameter.

                  <?php
                  // Let's suppose this is your mysqli connector
                  $mysqli = mysqli_connect("localhost", "user", "password", "database");
                  
                  // Then your code should looks like this:
                  $updatequery = "
                      UPDATE
                          as_comprofiler
                      SET
                          cb_empstatustime = '".time()."'
                          , cb_profiel = '".mysqli_real_escape_string($mysqli, $value->profile->nickname)."'
                          , cb_empstatus = '".mysqli_real_escape_string($mysqli, $cb_empstatus)."'
                          , cb_taal = '".mysqli_real_escape_string($mysqli, $talen)."'
                          , cb_sms = '".mysqli_real_escape_string($mysqli, $sms)."'
                      WHERE
                          cb_boxnr = '".mysqli_real_escape_string($mysqli, $value->boxnumber)."'
                      "; 
                  ?>
                  

                  mysqli_real_escape_string 的文檔說(shuō)得很清楚:

                  mysqli_real_escape_string(mysqli $mysql, string $string): string

                  這意味著:

                  1. 第一個(gè)參數(shù)必須是 mysqli 對(duì)象,由 mysqli_connect() 或 mysqli_init()
                  2. 第二個(gè)參數(shù)必須是要轉(zhuǎn)義的字符串.

                  這篇關(guān)于mysqli_real_escape_string() 期望參數(shù) 1 是 mysqli,布爾值給定集合的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                    <tbody id='lMNX7'></tbody>

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

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

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

                            <tfoot id='lMNX7'></tfoot>
                          • <i id='lMNX7'><tr id='lMNX7'><dt id='lMNX7'><q id='lMNX7'><span id='lMNX7'><b id='lMNX7'><form id='lMNX7'><ins id='lMNX7'></ins><ul id='lMNX7'></ul><sub id='lMNX7'></sub></form><legend id='lMNX7'></legend><bdo id='lMNX7'><pre id='lMNX7'><center id='lMNX7'></center></pre></bdo></b><th id='lMNX7'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lMNX7'><tfoot id='lMNX7'></tfoot><dl id='lMNX7'><fieldset id='lMNX7'></fieldset></dl></div>
                            主站蜘蛛池模板: 日韩成人av在线 | 欧美日韩精品一区二区天天拍 | 男女羞羞视频在线免费观看 | 一区二区三区视频免费看 | 综合成人在线 | 欧美亚洲视频 | 亚洲a视频 | 欧美一区二区三区在线观看 | 日本欧美在线视频 | 成人一区二区三区在线观看 | 亚洲福利片 | 亚洲视频一区二区三区 | 精品一区二区三区在线视频 | 最新国产在线 | 国产美女在线观看 | 欧美久久综合 | 黄色在线观看国产 | 国产欧美日韩一区 | 一级毛片在线看 | 色视频www在线播放国产人成 | wwwxxx国产| 人人种亚洲 | 久久99精品久久久久子伦 | 精品自拍视频 | 毛片免费看 | 欧美9999| 成人h动漫亚洲一区二区 | 亚洲三级在线观看 | 福利视频一区二区三区 | 自拍偷拍亚洲欧美 | 日韩毛片| 精品国产一区二区三区免费 | 欧美日韩中 | 亚洲日本视频 | 天天欧美 | 一区欧美 | 久久精品国产久精国产 | 免费看黄色国产 | 午夜精品久久 | 成人av高清在线观看 | 羞羞的视频免费在线观看 |