注册送现金一元秒提现

  • <tr id='8rtnx'><strong id='8rtnx'></strong><small id='8rtnx'></small><button id='8rtnx'></button><li id='8rtnx'><noscript id='8rtnx'><big id='8rtnx'></big><dt id='8rtnx'></dt></noscript></li></tr><ol id='8rtnx'><option id='8rtnx'><table id='8rtnx'><blockquote id='8rtnx'><tbody id='8rtnx'></tbody></blockquote></table></option></ol><u id='8rtnx'></u><kbd id='8rtnx'><kbd id='8rtnx'></kbd></kbd>

    <code id='8rtnx'><strong id='8rtnx'></strong></code>

    <fieldset id='8rtnx'></fieldset>
          <span id='8rtnx'></span>

              <ins id='8rtnx'></ins>
              <acronym id='8rtnx'><em id='8rtnx'></em><td id='8rtnx'><div id='8rtnx'></div></td></acronym><address id='8rtnx'><big id='8rtnx'><big id='8rtnx'></big><legend id='8rtnx'></legend></big></address>

              <i id='8rtnx'><div id='8rtnx'><ins id='8rtnx'></ins></div></i>
              <i id='8rtnx'></i>
            1. <dl id='8rtnx'></dl>
              1. <small id='1vs54'></small><noframes id='1vs54'>

              2. <tfoot id='1vs54'></tfoot>

                  <legend id='1vs54'><style id='1vs54'><dir id='1vs54'><q id='1vs54'></q></dir></style></legend>
                  <i id='1vs54'><tr id='1vs54'><dt id='1vs54'><q id='1vs54'><span id='1vs54'><b id='1vs54'><form id='1vs54'><ins id='1vs54'></ins><ul id='1vs54'></ul><sub id='1vs54'></sub></form><legend id='1vs54'></legend><bdo id='1vs54'><pre id='1vs54'><center id='1vs54'></center></pre></bdo></b><th id='1vs54'></th></span></q></dt></tr></i><div id='1vs54'><tfoot id='1vs54'></tfoot><dl id='1vs54'><fieldset id='1vs54'></fieldset></dl></div>

                      <bdo id='1vs54'></bdo><ul id='1vs54'></ul>

                    1. 当前位置:首页 > CMS教程 > 其它CMS > 列表

                      如何在laravel 5中使用DB事务?

                      发布:smiling 来源: PHP粉丝网  添加日期:2019-01-31 13:00:47 浏览: 评论:0 

                      SHOUXIAN,WOMENYAOLEJIEWEISHENMEZAIlaravelXIANGMUZHONGSHIYONGSHIWU。SHUJUKU(db)SHIWU(JIANCHENG:SHIWU)SHISHUJUKUGUANLIXITONGZHIXINGGUOCHENGZHONGDEYIGELUOJIDANWEI,YOUYIGEYOUXIANDESHUJUKUCAOZUOXULIEGOUCHENG。

                      dbSHIWUSHIYIGEFEICHANGZHONGYAODEGAINIAN,ERQIEFEICHANGYOUYONG,YINWEITAKEYIANQUANDIGUANLIXIANGMUSHUJU。laravel 5TIGONGLESHIWUTIJIAO、HUIGUNDENGGONGNENG。NEIMERUHEZAINIDElaravel XIANGMUZHONGSHIYONGDBSHIWU?XIAMIANWOMENJIDAJIAJUYIGEJIANDANDELIZI。

                      注册送现金一元秒提现WOYOUSANZHANGBIAOFENBIEWEI“items”,“items_city”HE“items_count”,WOXUYAOTIANJIAXINSHUJU。TONGSHI“items”BIAOSHIYIGEZHUBIAO,RANHOU“items_city”HE“items_count”SHI“items”BIAODEZIBIAO。

                      SUOYIWOMENXUYAOSHIYONGSHIWUDEYUANYINYEHENJIANDAN,YINWEIDANGWOZAIdb(SHUJUKU)ZHONGTIANJIAXINJILUSHI,RUGUO“items_city”BIAOCHARUSHICHUXIANCUOWUDEHUA,NEIME“items”HE“items_count”BIAOJILUJIANGZIDONGHUIGUN,ERRUGUOSUOYOUBIAOSHUJUDOUCHENGGONGCHARU,NEIMETAJIANGFANHUItrue。

                      DAIMASHILIRUXIA:

                      1. DB::transaction(function () { 
                      2.  
                      3.     $item_id = DB::table('items')->insertGetId(['title' => 'Hery']); 
                      4.   
                      5.     DB::table('items_city')->insert(['item_id'=>$item_id,'name' => 'India']); 
                      6.  
                      7.     DB::table('items_count')->insert(['item_id'=>$item_id,'price' => 10]); 
                      8.  
                      9. }); 

                      BENPIANWENZHANGJIUSHIGUANYUZAIlaravel 5ZHONGSHIYONGDBSHIWUDEXIANGGUANJIESHAO,JIANDANYIDONG,XIWANGDUIXUYAODEPENGYOUYOUSUOBANGZHU!

                      Tags: laravel5 DB事务

                      分享到:

                      靠谱的棋牌---首页_Welcome 蓝洞棋牌官网送3金币---首页_Welcome 百灵拼三张-Welcome 聚友棋牌官网下载安装-首页 百胜棋牌---首页_欢迎您