首页
\
问答
\
使用带有mysql的Transaction时,我们可以进行多次回滚吗?(Can we have multiple rollback while using Transaction with mysql)
使用带有mysql的Transaction时,我们可以进行多次回滚吗?(Can we have multiple rollback while using Transaction with mysql)
DB::beginTransaction(); if(some condition) { if(some condition) { DB::commit(); } else { //first rollback DB::rollback(); } }else { //second rollback DB::rollback(); }
我们可以在事务中有多个回滚语句吗?
DB::beginTransaction(); if(some condition) { if(some condition) { DB::commit(); } else { //first rollback DB::rollback(); } }else { //second rollback DB::rollback(); }
can we have multiple rollback statement in an transaction?
原文:https://stackoverflow.com/questions/30319662
更新时间:2024-04-15 08:04
最满意答案
你去: http : //codepen.io/dherran/pen/KzEdZZ
.wrapper { width: 400px; } .left { float: left; height: 100px; max-width: calc(100% - 40px); overflow-x: auto; overflow-y: hidden; white-space: nowrap; } .right { float: left; width: 40px; height: 100px; background: black; color: white; text-align: center; } .box { display: inline-block; width: 40px; height: 100px; border: 1px solid white; background: blue; }
<div class="wrapper"> <div class="left"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> <div class="right"> + </div> </div>
Here you go: http://codepen.io/dherran/pen/KzEdZZ
.wrapper { width: 400px; } .left { float: left; height: 100px; max-width: calc(100% - 40px); overflow-x: auto; overflow-y: hidden; white-space: nowrap; } .right { float: left; width: 40px; height: 100px; background: black; color: white; text-align: center; } .box { display: inline-block; width: 40px; height: 100px; border: 1px solid white; background: blue; }
<div class="wrapper"> <div class="left"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> <div class="right"> + </div> </div>
相关问答
更多-
尝试添加position: relative对于您的navbar-wrapper类。 以下是发生的事情: 当你开始滚动时, position: relative声明被动态地添加到带有类navbar-wrapper的div作为内联样式,并激发框阴影。 如果你直接将这个声明添加到类中,那么箱子的阴影就是从一开始就存在的。 Try adding position: relative to your navbar-wrapper class. Here's what's happening: When you st ...
-
你去: http : //codepen.io/dherran/pen/KzEdZZ .wrapper { width: 400px; } .left { float: left; height: 100px; max-width: calc(100% - 40px); overflow-x: auto; overflow-y: hidden; white-space: nowrap; } .right { float: left; wi ...
-
如何在具有特定列大小的div内制作html滚动表?(How to make a html scrolling table inside a div with specific column sizes?)[2022-09-30]
您可以为表添加宽度,使其具有水平滚动。 table { width:1400px; } 更好的选择是使用table-layout属性。 table { width:100%; table-layout:fixed; } 您遇到的保证金问题是由.mainframe元素的高度引起的。 删除height: 200px; 如果你需要.mainframe元素的高度,并且你知道它将是一个固定的高度,你只需要减小.wrapper元素的高度。 您可以使用精确的像素高度。 我使用了以下百分比。 . ... -
将OSMDroid滚动限制为特定的边界框和缩放级别(Restrict OSMDroid scrolling to a specific bounding box & zoom level)[2023-06-22]
实现MapListener接口,我覆盖了OnZoom函数。 根据当前缩放级别和屏幕上可见的点,可以通过调用mapView.setScrollableAreaLimit来设置可滚动边界mapView.setScrollableAreaLimit 。 Implementing MapListener interface, I overrode the OnZoom function. Depending upon current zoomlevel and the points visible on scree ... -
HTML容器滚动错误(html container scrolling bug)[2020-01-12]
添加位置:固定; body和overflow-y:滚动到.content 也不要“关闭”/ br它只是br或br / for额外的兼容性。
你也不能嵌套p标签(在另一个p标签里面有ap标签)或者在ap标签中有一个列表 - 一个列表获得它自己的样式 - 所以摆脱你的列表+列表标题。 而且每个myPanel的末尾都有一个额外的/ div - 应该只有三个。 另外,0值之后不应该有单位(例如%)。 通过csslint.net运行你的CSS 您还有一些不必要的CSS属性 - 例如,您的标题和导航不需要 ... -
你的最后一行代码缺少#引用id为SelectedProjects的元素。 相反,现在它正在寻找SelectedProjects元素。 通过添加缺少的#修复此问题: var currentSize = $("#SelectedProjects").attr("size"); currentSize++; alert(currentSize); $("#SelectedProjects").attr("size", currentSize); 希望这可以帮助。 Your ...
-
当文本达到最小/最大大小时,使用JavaScript禁用HTML按钮(Disabling HTML button with JavaScript when text reaches min/max size)[2023-04-16]
您的按钮未被禁用,因为条件currentSize== "66.6667pt"永远不会成立。 看起来你正在处理两次禁用状态,因为除了禁用按钮之外,如果大小小于60,你的函数会提前返回: if(csz > 60) return; 因此,在点击几次后,您的大小最终会变为65.33333333333333pt,这会阻止其在后续点击时变大,但它永远不会满足禁用按钮的条件。 您认为有两种不同的东西是最大允许尺寸:一个地方60个,另一个地方66.6667个。 尝试定义一次并在两个地方使用它: var maxSize=6 ... -
每次用户滚动时,您的代码都会创建一个新的UILabel如果满足条件,则只隐藏最新的UILabel 。 所以尝试这样的事情; let swipeFurther = UILabel() override func viewDidLoad() { super.viewDidLoad() swipeFurther.frame = CGRectMake(10.0, 33.0, 300.0, 20.0) swipeFurther.text = "Swipe Further to open t ...
-
这是我一直使用的解决方案。 http://www.cssstickyfooter.com/ 你设置: html, body {height: 100%;} 将300px底部填充添加到主包装,然后将负边距-300px添加到页脚以将其覆盖在该填充之上。 除了页脚之外的所有内容都使用一个巨大的包装:
-
响应式HTML滚动框(Responsive HTML Scrolling Box)[2022-01-01]
这就是你要找的http://jsfiddle.net/ZXVA5/ 你想给height和width一些百分比。 这里有一些内容和overflow:auto http://jsfiddle.net/ZXVA5/1/ is this what you are looking for http://jsfiddle.net/ZXVA5/ you want to give the height and width some percentage. here is with some content and over ...