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

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

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

      2. <legend id='nWxsf'><style id='nWxsf'><dir id='nWxsf'><q id='nWxsf'></q></dir></style></legend>

      3. <tfoot id='nWxsf'></tfoot>

        PDO lastInsertId 問題,php

        PDO lastInsertId issues, php(PDO lastInsertId 問題,php)
          <bdo id='oL1BH'></bdo><ul id='oL1BH'></ul>
            <tbody id='oL1BH'></tbody>
          <i id='oL1BH'><tr id='oL1BH'><dt id='oL1BH'><q id='oL1BH'><span id='oL1BH'><b id='oL1BH'><form id='oL1BH'><ins id='oL1BH'></ins><ul id='oL1BH'></ul><sub id='oL1BH'></sub></form><legend id='oL1BH'></legend><bdo id='oL1BH'><pre id='oL1BH'><center id='oL1BH'></center></pre></bdo></b><th id='oL1BH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='oL1BH'><tfoot id='oL1BH'></tfoot><dl id='oL1BH'><fieldset id='oL1BH'></fieldset></dl></div>

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

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

                  本文介紹了PDO lastInsertId 問題,php的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我已經(jīng)嘗試了很多方法來使用下面的代碼(來自較大班級的片段)獲取最后插入的 ID,現(xiàn)在我已經(jīng)放棄了.

                  I have tried lots of ways to get the last inserted ID with the code below (snipplet from larger class) and now I have given up.

                  有誰知道如何讓 PDO lastInsertId 工作?

                  Does anyone know howto get PDO lastInsertId to work?

                  提前致謝.

                      $sql = "INSERT INTO auth (surname, forename, email, mobile, mobilepin, actlink, regdate) VALUES (:surname, :forename, :email, :mobile, :mobpin, :actlink, NOW())";
                  $stmt = $this->dbh->prepare($sql);
                  if(!$stmt) {
                   return "st";
                  }
                  
                  $stmt->bindParam(':surname', $this->surname);
                  $stmt->bindParam(':forename', $this->forename);
                  $stmt->bindParam(':email', $this->email);
                  $stmt->bindParam(':mobile', $this->mobile);
                  $stmt->bindParam(':mobpin', $this->mobilePin);
                  $stmt->bindParam(':actlink', $this->actlink);
                  
                  $result = $stmt->execute();
                  //return var_dump($result);
                  $arr = array();
                  $arr = $stmt->errorInfo();
                  $_SESSION['record'] = 'OK' . $dbh->lastInsertId();
                  $arr .= $_SESSION['record'];
                  return $arr;
                  

                  推薦答案

                  在您的代碼片段中,我看到了一些可能對問題產(chǎn)生影響的輕微不一致.例如,在準(zhǔn)備您使用的 SQL 語句的代碼中,

                  In your code snippet, I saw some minor inconsistencies that may have an effect on the problem. For an example, in the code to prepare your SQL statement you use,

                  $stmt = $this->dbh->prepare($sql); 
                  

                  注意 $this 關(guān)鍵字.然后要檢索 ID,您調(diào)用,

                  Notice the $this keyword. Then to retrieve the ID, you call,

                  $dbh->lastInsertId();
                  

                  你有沒有試過使用,

                  $this->dbh->lastInsertId();

                  這篇關(guān)于PDO lastInsertId 問題,php的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(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)程序)
                        <tfoot id='HVQQQ'></tfoot>
                        <i id='HVQQQ'><tr id='HVQQQ'><dt id='HVQQQ'><q id='HVQQQ'><span id='HVQQQ'><b id='HVQQQ'><form id='HVQQQ'><ins id='HVQQQ'></ins><ul id='HVQQQ'></ul><sub id='HVQQQ'></sub></form><legend id='HVQQQ'></legend><bdo id='HVQQQ'><pre id='HVQQQ'><center id='HVQQQ'></center></pre></bdo></b><th id='HVQQQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HVQQQ'><tfoot id='HVQQQ'></tfoot><dl id='HVQQQ'><fieldset id='HVQQQ'></fieldset></dl></div>
                          <tbody id='HVQQQ'></tbody>

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

                      1. <legend id='HVQQQ'><style id='HVQQQ'><dir id='HVQQQ'><q id='HVQQQ'></q></dir></style></legend>
                        • <bdo id='HVQQQ'></bdo><ul id='HVQQQ'></ul>

                            主站蜘蛛池模板: 手机看片169 | 欧美13videosex性极品 | 777zyz色资源站在线观看 | 狠狠入ady亚洲精品经典电影 | 久久精品视频99 | 黄色三级在线播放 | 99精品电影 | 久久精品国产99国产 | 亚洲精品国产第一综合99久久 | 成人国产免费视频 | 成人一区二区三区 | 亚洲精品一区二三区不卡 | 免费看av大片 | 日韩精品一区二区三区视频播放 | 日韩一区在线播放 | 手机在线观看 | 国产精品伦一区二区三级视频 | 亚洲在线电影 | 91精品国产综合久久久动漫日韩 | av天天看| 亚洲精品一区二区在线观看 | 三级特黄特色视频 | 久久久久久国产精品免费 | 成人午夜影院 | 一级久久久久久 | 成人免费淫片aa视频免费 | 91免费在线看 | 久久精品视频网站 | 欧美日韩国产在线 | 国产一区二区 | 国产精品成人69xxx免费视频 | 国产成人午夜精品影院游乐网 | 久久久久久国产精品免费免费 | av片免费| 四虎网站在线观看 | 日韩在线中文字幕 | 成人免费视频网址 | 一区二区在线不卡 | 91视频在线看 | 久久国产视频网站 | h在线看 |