mysql - How insert multiple rows in three different table at a time through procedure -


if want insert multiple rows in 3 different table a, b , c @ time through procedure in mysql error comes when data inserted in " c " table , data not insert in table " c " data inserted in table " " , " b ". how can rollback table , b , how put exception log data not inserted in table " c ".

you have set autocommit=0 before executing query.

after call store procedure,if there error found in store procedure not call

con.commmit() con object of connection class.

if store procedure ran smoothly call con.commit() affect in table no need rollback it.


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -