Jump to content
Larry Ullman's Book Forums

Recommended Posts

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

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

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

 Share

×
×
  • Create New...