Paul Posted April 22, 2011 Share Posted April 22, 2011 Hiya, I'm trying to run the example in chapter 6 for ROLLBACK. I'm using PHPMyAdmin. I start with START TRANSACTION;, and change the balance. The balance changes OK but when I go back into SQL and type ROLLBACK; it has no effect. Does ROLLBACK not work in PHPMyAdmin because when you do SELECT blah blah to check the balance change it leaves the SQL window and displays the results in a table. I then click back on the SQL tab and type ROLLBACK;. Any ideas. Cheers Paul Link to comment Share on other sites More sharing options...
Larry Posted April 22, 2011 Share Posted April 22, 2011 Sorry for the confusion. You cannot perform transactions using phpMyAdmin because each submission of a query is in itself a complete transaction (as with any Web page, there's no persistent connection and transaction from one loading of a page to another). I've added text to the fourth edition of the book, which I'm writing now, to make this more clear. Link to comment Share on other sites More sharing options...
Paul Posted April 23, 2011 Author Share Posted April 23, 2011 Thanks Larry, But looking ahead there may come a time when I would need to write something involving ROLLBACK but would be unable to test it, presumambly anything involving e-commerce. Would I need to use MySQL client to test it? Cheers Paul Link to comment Share on other sites More sharing options...
Larry Posted April 23, 2011 Share Posted April 23, 2011 Yes, exactly. The MySQL client can be used, as in the book. Link to comment Share on other sites More sharing options...
Recommended Posts