MySql Transaction and oRs:Save()

Post Reply
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

MySql Transaction and oRs:Save()

Post by vilian »

Do you know if there is a transaction control inside oRs:Save()?
If there is, is possible disable it ?
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
ShumingWang
Posts: 465
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China
Contact:

Re: MySql Transaction and oRs:Save()

Post by ShumingWang »

if set autocommit=0;
//oserver:query("set autocommit=0")
oserver:query(" start transaction")
... update/sve/insert/delete sql

if ... error
oserver:query("rollback")

else
oserver:query("commit")

end
//
if set autocommit=1;
... single sql include commit /rollback
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
User avatar
vilian
Posts: 984
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil
Contact:

Re: MySql Transaction and oRs:Save()

Post by vilian »

Thank you,

I found in the topic bellow the answer for my question ;)

https://forums.fivetechsupport.com/view ... 16#p248789
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil
Post Reply