Re: [PHP] transactions

2004-03-29 Thread Adam Voigt
I believe you can use transactions with InnoDB tables on MySQL, if this is the case, a simple BEGIN; to begin your transaction, and a COMMIT; to save all the changes, plus a ROLLBACK; to undo your changes, should be sufficient. On Mon, 2004-03-29 at 13:12, Matthew Oatham wrote: Hi, Is there

RE: [PHP] transactions

2004-03-29 Thread Pablo Gosse
Matthew Oatham wrote: Hi, Is there an elegant way to recover from DB errors in MySQL using PHP, i.e. transactions and rolling back - basically I have an insert statement then an update statement. if the insert succeeds the update is run but if the update fails I want to undo the insert!

Re: [PHP] transactions

2004-03-29 Thread John Holmes
Matthew Oatham wrote: Is there an elegant way to recover from DB errors in MySQL using PHP, i.e. transactions and rolling back - basically I have an insert statement then an update statement. if the insert succeeds the update is run but if the update fails I want to undo the insert! Use

Re: [PHP] transactions

2004-03-29 Thread Justin Patrin
Though I know there are many people out there who cringe at the thought of using DB abstraction layers, I really like ADOdb and it has very nice transaction support built in (as long as the underlying database supports it, obviously). I don't know why people hate them sothey make life so

Re: [PHP] transactions

2004-03-29 Thread Daniel Guerrier
yup - use transactions. http://www.mysql.com/doc/en/COMMIT.html --- Matthew Oatham [EMAIL PROTECTED] wrote: Hi, Is there an elegant way to recover from DB errors in MySQL using PHP, i.e. transactions and rolling back - basically I have an insert statement then an update statement. if the

RE: [PHP] transactions

2004-01-29 Thread craig
Is there anyway to do something similar to Transactions in mysql? Yes, use transactions http://www.mysql.com/doc/en/Transactional_Commands.html -Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] transactions

2004-01-29 Thread Lowell Allen
Is there anyway to do something similar to Transactions in mysql? Yes -- http://www.mysql.com/doc/en/ANSI_diff_Transactions.html -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] transactions

2004-01-29 Thread John Nichel
Diana Castillo wrote: Is there anyway to do something similar to Transactions in mysql? Maybe the transaction section of the MySQL manual will help you out? http://www.mysql.com/doc/en/Transactional_Commands.html -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General

Re: [PHP] transactions

2001-02-11 Thread Curtis Maurand
look at the syntax for locking the tables. Curtis - Original Message - From: "Christian Dechery" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February 11, 2001 7:14 PM Subject: [PHP] transactions Hi, I was reading mysql's manual, about transactions and all... and I didn't