首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 其他服务器 >

帮小弟我看看这段代码有什么东东?谢谢了!

2012-02-04 
帮我看看这段代码有什么错误?????多谢了!!!!!!!!!cftrycfset commitItyescftransaction actionb

帮我看看这段代码有什么错误?????多谢了!!!!!!!!!
<cftry>
<cfset commitIt="yes">
<cftransaction action="begin">
<cfquery name="del_c" datasource="province">
delete from city where provinceID='#FORM.provinceID#'
</cfquery>
<cfquery name="del" datasource="province">
delete from province where provinceID='#FORM.provinceID#'
</cfquery>
<cfcatch type="database">
<cftransaction action="rollback">
<cfset commitIt="no">
</cfcatch>
<cfif commitIt>
<cftransaction action="commit">
<cfelse>
<cfset commitIt="yes">
</cfif>
</cftransaction>
</cftry>

[解决办法]
<cftry>
<cfset commitIt="yes">
<cftransaction>
<cfquery name="del_c" datasource="province">
delete from city where provinceID='#FORM.provinceID#'
</cfquery>
<cfquery name="del" datasource="province">
delete from province where provinceID='#FORM.provinceID#'
</cfquery>
</cftransaction>
<cfcatch>
<cfset commitIt="no">
</cfcatch>
</cftry>

热点排行