Mysql Transaction Help

Started on the old forum in March 2012 · view the original in the archive · old links redirect here

#mysql #transaction

3 replies · 549 views · started 14 years ago · 1 min read

2 participants
StunningNick Junior · 40 posts #1

mysql_query('SET AUTOCOMMIT = 0; START COPYING'); mysql_query($query1); mysql_query($query2); ...... mysql_query($query7); if ( $all done ) mysql_query( 'COMMIT' ); else mysql_query( 'ROLLBACK' );

now here is a problem whenever in transaction process amount of mysql query's exceeds 2 query's , the script will start looping (don't know what kinda looping, just an guess don't laugh now 🤨 🤣) without any sign of terminating until the script process reaches php max execution time limit... well that's minor now comes the real headache after that any mysql query run will do same behaviour, will start looping until php max execution time limit is reached .

strange .......... 🙁 🤷 well this is working fine with mysqli & odbc DB's .

Don't think i am bad , i used to be too good one time...

just_m3. Developer · 199 posts #2

StunningNick wrote: mysql_query('SET AUTOCOMMIT = 0; START COPYING'); mysql_query($query1); mysql_query($query2); ...... mysql_query($query7); if ( $all done ) mysql_query( 'COMMIT' ); else mysql_query( 'ROLLBACK' );

now here is a problem whenever in transaction process amount of mysql query's exceeds 2 query's , the script will start looping (don't know what kinda looping, just an guess don't laugh now 🤨 🤣) without any sign of terminating until the script process reaches php max execution time limit... well that's minor now comes the real headache after that any mysql query run will do same behaviour, will start looping until php max execution time limit is reached .

strange .......... 🙁 🤷 well this is working fine with mysqli & odbc DB's .

Please post full code / mysql request with defined $vars ... so we can help you !

$query1 ??? $query2 ??? $query7 ??? $all done .. i know you've just posted the executing idea .. form .. but you will not get any help this way 🙂!

This is ten percent luck, twenty percent skill Fifteen percent concentrated power of will Five percent pleasure, fifty percent pain 😂And a hundred percent reason to remember the name!

StunningNick Junior · 40 posts #3

@just_m3

well it does not matter what query i make it maybe any simple CRUD statement, results are same, i tried making it separate from main project and run through it's own individual page , i haven't found any solution else of restarting system even same occurred on local machine.... ( tried mysql_close() thought it may close connection & will not have to restart entire system ) 🙂

Don't think i am bad , i used to be too good one time...

StunningNick Junior · 40 posts #4

mysql_query( 'SET AUTOCOMMIT = 1' ); finally solved it ... 😀

Don't think i am bad , i used to be too good one time...

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close