RE: Best practise roll-backs?

2004-03-11 Thread Victor Pendleton
Any reason you can use a version of MySQL that contains transaction aware tables? -Original Message- From: Andy Hall To: [EMAIL PROTECTED] Sent: 3/11/04 8:29 AM Subject: Best practise roll-backs? Hi, I have a PHP script that is running 4 queries. If the 4th fails, ideally I would like

Re: Best practise roll-backs?

2004-03-11 Thread T Cunningham
If you have a reason not to use InnoDB tables (e.g., speed, licensing, fulltext indexes), you can implement pretty good client-side rollback in PHP. Just send all calls through a database class (insert(), update(), delete()) and if a transaction flag is set then they store in a stack a little

Re: Best practise roll-backs?

2004-03-11 Thread andrebras
Hi, before you start to make inserts/updates to the database you can put $db-query(begin;) - this is to begin a transaction, in the end of the script you put commit ($db-query(commit;) if all goes ok, otherwise rollback ($db-query(rollback;). andré brás Citando Andy Hall [EMAIL PROTECTED]: