本文介紹了mysqli_insert_id 是否有可能在高流量應(yīng)用程序中返回錯(cuò)誤的 id?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
在高流量應(yīng)用程序中,mysqli_insert_id()
是否有可能返回錯(cuò)誤的 id,或者在幾乎同時(shí)執(zhí)行的兩個(gè) INSERT
查詢(xún)之間混淆 id?
In a high traffic application, is it possible for mysqli_insert_id()
to return the wrong id, or to confuse the id between two INSERT
queries performed nearly simultaneously?
推薦答案
沒(méi)有.mysqli_insert_id
返回當(dāng)前連接上最近 INSERT
查詢(xún)中最多的 AUTO_INCREMENT
值.例如,它永遠(yuǎn)不會(huì)與其他連接混淆.
No. mysqli_insert_id
returns the most the AUTO_INCREMENT
value from the most recent INSERT
query on the current connection. It will never get confused with another connection, for example.
這篇關(guān)于mysqli_insert_id 是否有可能在高流量應(yīng)用程序中返回錯(cuò)誤的 id?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!