Is it possible for mysqli_insert_id to return an incorrect id in high traffic applications?

前端 未结 4 1539
甜味超标
甜味超标 2020-12-06 18:54

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 perfor

4条回答
  •  有刺的猬
    2020-12-06 19:38

    Yes it is posible! If you have multiple tables to insert with same connection and your last insert was incorrect (like I trying insert unescaped quotes in text).

    I think it returns last successful insert id which can by from different table. I just spent hour to find this. Peace

提交回复
热议问题