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

<tfoot id='3YEaC'></tfoot>

    <bdo id='3YEaC'></bdo><ul id='3YEaC'></ul>

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

    <small id='3YEaC'></small><noframes id='3YEaC'>

        <legend id='3YEaC'><style id='3YEaC'><dir id='3YEaC'><q id='3YEaC'></q></dir></style></legend>

        mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲

        Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?)

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

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

                1. 本文介紹了mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我有一個(gè) mysql 問題,mysqli_insert_id() 返回來自整個(gè)服務(wù)器或插入該 ID 的特定用戶的記錄?因?yàn)槿绻鼜恼w返回那么使用這個(gè)功能將不安全

                  I have mysql question that mysqli_insert_id() returns record from overall server or from specific user who has inserted that id? Because if it returns from overall then it won't be secure to use this function

                  推薦答案

                  上面@daan 的評(píng)論完全錯(cuò)誤.insert_id() 返回放入執(zhí)行 insert_id() 查詢的連接執(zhí)行的最后一個(gè) insert 查詢的 auto_increment 字段中的 ID.

                  The comment from @daan above is flat-out wrong. insert_id() returns the ID placed into an auto_increment field of the last insert query that the connection executing the insert_id() query performed.

                  它不返回表中最大的 ID,它不返回某個(gè) OTHER 連接創(chuàng)建的 id,它不返回某個(gè) OTHER 用戶創(chuàng)建的 id.

                  It does not return the largest ID in the table, it doesn't return the id created by some OTHER connection, it doesn't return the id created by some OTHER user.

                  它實(shí)際上是由 LAST 插入 YOU 創(chuàng)建的最后一個(gè) ID YOU.

                  It is literally the last ID YOU created by the LAST insert YOU performed.

                  這意味著執(zhí)行插入是 100% 可靠的,通過 last_insert_id() 獲取創(chuàng)建的 ID,然后在其他查詢中使用該 ID 創(chuàng)建父/子記錄.

                  That means it is 100% reliable to perform an insert, get the created ID via last_insert_id() and then use that ID in other queries to create parent/child records.

                  但請(qǐng)注意,insert_id() 只會(huì)返回 ONE id 值.如果您進(jìn)行多值插入,您仍然只能從最后一個(gè)值集中獲取 ID,例如

                  But note that insert_id() only ever returns ONE id value. If you do a multi-value insert, you still only get the ID from the last value set, e.g.

                  INSERT INTO sometable (x, y) VALUES (1,2), (2,3)
                  

                  仍然在內(nèi)部執(zhí)行兩次插入,您只能獲得 2,3 元組的 id,而不是 1,2.

                  still performs two inserts internally, and you'd only get the id for the 2,3 tuple, not the 1,2.

                  同樣,之前的所有查詢都沒有內(nèi)存:

                  As well, there's no memory for all previous queries:

                  INSERT ...   // query #1
                  INSERT ...   // query #2
                  SET id = last_insert_id();
                  

                  只會(huì)得到查詢#2創(chuàng)建的ID,查詢#1的ID丟失"了.

                  will only get the ID created by query #2, and the ID from query #1 is "lost".

                  這篇關(guān)于mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(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)程序)
                    1. <tfoot id='1kLON'></tfoot>

                      <small id='1kLON'></small><noframes id='1kLON'>

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

                          <tbody id='1kLON'></tbody>
                        <legend id='1kLON'><style id='1kLON'><dir id='1kLON'><q id='1kLON'></q></dir></style></legend>

                            <bdo id='1kLON'></bdo><ul id='1kLON'></ul>
                          • 主站蜘蛛池模板: 久久久www成人免费精品张筱雨 | 毛片网站在线观看视频 | 成人亚洲片 | 欧美性生活一区二区三区 | 久久久一区二区三区 | 亚洲一区二区三区四区五区中文 | 在线一区视频 | 亚洲欧美综合 | 亚洲精品久久视频 | 97免费在线视频 | 久久尤物免费一区二区三区 | 五月激情综合 | 米奇狠狠鲁 | 91社区在线观看 | 一区二区三区视频在线观看 | 国产精品久久在线观看 | 亚洲精品乱码 | 亚洲成人一区 | 欧美中文在线 | av一区二区在线观看 | 日韩在线视频一区 | 日韩免费视频 | 精品中文字幕一区 | 日韩精品在线观看视频 | 亚洲精品中文字幕在线观看 | 亚洲a在线观看 | 日韩欧美在线一区 | 午夜成人免费电影 | 日韩精品中文字幕在线 | 亚洲精品一区二区在线观看 | av官网在线| 精品一区二区在线视频 | 精品日韩欧美一区二区 | 久久99精品视频 | 色888www视频在线观看 | 久久国产精品视频 | 天天操操| 亚洲精品一区二区 | 国产精品视频区 | 中文字幕一区二区在线观看 | 久久999 |