dave_biscuits Posted February 23, 2010 Share Posted February 23, 2010 Hi Everyone, I'm trying to do a simple procedure: begin, update, rollback ... only problem is it keeps committing!! I'm tearing my hair out here ... tried it numerous ways with no success so far. Current code looks like: /* turn autocommit off */ mysqli_autocommit($link, FALSE); mysqli_query($link, "UPDATE customer SET ".$update." WHERE customer_uid = '".$data['customer_uid']."';"); mysqli_rollback($link); But it keeps updating the database despite my efforts. PHP5, Apache 2.2, FreeBSD 7.0 ... pretty much out of the box setup config wise. Any ideas?? Thanks, Dave Quote Link to comment https://forums.phpfreaks.com/topic/193075-why-cant-i-rollback/ Share on other sites More sharing options...
veridicus Posted February 23, 2010 Share Posted February 23, 2010 Are your tables MyISAM? Non-transactional table types can only auto-commit and won't show any error if you try to rollback. Quote Link to comment https://forums.phpfreaks.com/topic/193075-why-cant-i-rollback/#findComment-1016814 Share on other sites More sharing options...
dave_biscuits Posted February 24, 2010 Author Share Posted February 24, 2010 Nuts, looks like it is (mysql ver 5.1) ... so no rollbacks, ouch that sucks (Edit: read up on switching to innodb, all good now ) Appreciate the help, cheers. Quote Link to comment https://forums.phpfreaks.com/topic/193075-why-cant-i-rollback/#findComment-1017138 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.