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

        <bdo id='5jCce'></bdo><ul id='5jCce'></ul>

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

        <tfoot id='5jCce'></tfoot>

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

      3. 如何禁用 Laravel eloquent Auto Increment?

        How to disable Laravel eloquent Auto Increment?(如何禁用 Laravel eloquent Auto Increment?)
          <i id='rFCAP'><tr id='rFCAP'><dt id='rFCAP'><q id='rFCAP'><span id='rFCAP'><b id='rFCAP'><form id='rFCAP'><ins id='rFCAP'></ins><ul id='rFCAP'></ul><sub id='rFCAP'></sub></form><legend id='rFCAP'></legend><bdo id='rFCAP'><pre id='rFCAP'><center id='rFCAP'></center></pre></bdo></b><th id='rFCAP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rFCAP'><tfoot id='rFCAP'></tfoot><dl id='rFCAP'><fieldset id='rFCAP'></fieldset></dl></div>

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

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

          <tfoot id='rFCAP'></tfoot>
              <bdo id='rFCAP'></bdo><ul id='rFCAP'></ul>
                    <tbody id='rFCAP'></tbody>
                • 本文介紹了如何禁用 Laravel eloquent Auto Increment?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我需要一種有效的方法來(lái)禁止 Laravel 自動(dòng)識(shí)別我要插入數(shù)據(jù)的表的主鍵.

                  I need an effective way to disable Laravel from auto incriminating the primary key of the table which I am going to insert data in.

                  為什么?我不檢查數(shù)據(jù)庫(kù)和插入的數(shù)據(jù)之間是否有任何重復(fù),所以如果有任何重復(fù),我只是在 try-catch 塊中處理它.

                  Why? I don't check if there is any duplication between the DB and the inserted data so if there was any duplication I just handles it in a try-catch block.

                  問(wèn)題是如果有任何失敗,Laravel 會(huì)像我插入一行一樣計(jì)數(shù).所以 IDs 列不會(huì)按照這個(gè)順序 [1, 2, 3, etc],而是按照這個(gè) [1, 4, 8, 20, etc].

                  The problem is if there was any failure Laravel counts it like I have inserted a row. So IDs column is not going to be in this order [1, 2, 3, etc], but in this [1, 4, 8, 20, etc].

                  我搜索了很多關(guān)于這個(gè)問(wèn)題,我嘗試在類聲明后使用這一行:

                  I searched a lot about this issue and I have tried to use this line after the declaration of the class:

                  public $autoincrement = false;
                  

                  還有

                  public $incrementing = false;
                  

                  但它們不起作用.

                  我只想使用我的數(shù)據(jù)庫(kù)的 AI.不是 Laravel 的.

                  推薦答案

                  抱歉,大家耽誤了您的時(shí)間,問(wèn)題是,如果我們嘗試在 MYSQL 中保存任何記錄,無(wú)論它因任何原因返回成功還是失敗(例如在我的情況下重復(fù)),

                  Sorry for taking your time guys, The issue is if we tried to save any record in MYSQL whether it returned success or failure for any reason (like for duplication in my case),

                  MYSQL 計(jì)算自動(dòng)增量編號(hào)已被預(yù)訂,并且任何其他即將到來(lái)的記錄都不會(huì)占用它,因?yàn)榭赡芡瑫r(shí)在 DB 上有多個(gè)插入過(guò)程并等待知道自動(dòng)增量編號(hào)是否為預(yù)訂與否都會(huì)降低 MYSQL 的速度.

                  MYSQL counts that the auto increment number was booked and any other coming record is not going to take it because of there may be more than an insertion process on the DB in the same time and waiting to know if the auto incrementally number is booked or not will cost MYSQL its speed.

                  所以這不是 Laravel 的問(wèn)題,而是 MYSQL 的問(wèn)題.

                  So it is not a Laravel issue, its a MYSQL one.

                  我希望它可以幫助其他人.

                  I hope that it may help others.

                  謝謝大家...

                  這篇關(guān)于如何禁用 Laravel eloquent Auto Increment?的文章就介紹到這了,希望我們推薦的答案對(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)文檔推薦

                  MySQLi prepared statement amp; foreach loop(MySQLi準(zhǔn)備好的語(yǔ)句amp;foreach 循環(huán))
                  Is mysqli_insert_id() gets record from whole server or from same user?(mysqli_insert_id() 是從整個(gè)服務(wù)器還是從同一用戶獲取記錄?)
                  PHP MySQLi doesn#39;t recognize login info(PHP MySQLi 無(wú)法識(shí)別登錄信息)
                  mysqli_select_db() expects exactly 2 parameters(mysqli_select_db() 需要 2 個(gè)參數(shù))
                  Php mysql pdo query: fill up variable with query result(Php mysql pdo 查詢:用查詢結(jié)果填充變量)
                  MySQLI 28000/1045 Access denied for user #39;root#39;@#39;localhost#39;(MySQLI 28000/1045 用戶“root@“l(fā)ocalhost的訪問(wèn)被拒絕)

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

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

                          • <legend id='L33jb'><style id='L33jb'><dir id='L33jb'><q id='L33jb'></q></dir></style></legend>
                            主站蜘蛛池模板: 国产精品视频久久 | 自拍亚洲| 香蕉视频黄色 | 国产精品a久久久久 | 欧美成年网站 | 九九热国产精品视频 | 中文字幕亚洲视频 | 中文在线观看视频 | 免费簧片视频 | 欧美在线视频网 | 国产一区二区久久 | 久久久一区二区三区 | 99re在线免费视频 | 国产精品国产a级 | av大片在线观看 | 久久综合一区 | 欧美乱人伦视频 | 久久大香 | av黄色在线播放 | 天堂色网 | 欧美视频第三页 | 欧美一区二区三区久久精品 | 中文字幕精品一区二区三区精品 | 日韩欧美一级 | 久久com| 午夜精品一区二区三区在线观看 | 中文字幕精品视频在线观看 | 欧美2区| 国产精品高潮呻吟久久 | 久久久国产亚洲精品 | 成人伊人网 | 欧美1区2区| 成人久久18免费网站麻豆 | 欧美精品二区 | 喷潮网站| 久久噜| 美日韩中文字幕 | 91看片网 | 欧美精品一二三 | 亚洲视频手机在线 | 中文字幕av网站 |