Page 1 of 1
MySql Transaction and oRs:Save()
Posted: Tue Jul 09, 2024 1:17 pm
by vilian
Do you know if there is a transaction control inside oRs:Save()?
If there is, is possible disable it ?
Re: MySql Transaction and oRs:Save()
Posted: Wed Jul 10, 2024 2:10 am
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
Re: MySql Transaction and oRs:Save()
Posted: Wed Jul 10, 2024 11:02 am
by vilian
Thank you,
I found in the topic bellow the answer for my question
https://forums.fivetechsupport.com/view ... 16#p248789