benjaminbeazy Posted March 2, 2007 Share Posted March 2, 2007 I'm trying to finish off a user registration system but when I do the MySQL inserts on as many as 3 different tables, I need a failsafe where it only inserts into all 3 and if 1 fails not to insert anything in any of them. For example: query 1 worked query 2 worked query 3 failed so remove inserted rows from all 3 queries not sure, I would like it if there's a way to not insert anything without it first making sure all 3 will work any suggestions?? p.s. also not sure if this should be in mysql or php help Link to comment https://forums.phpfreaks.com/topic/40799-user-registration-mysql-failsafe/ Share on other sites More sharing options...
btherl Posted March 2, 2007 Share Posted March 2, 2007 Unfortunately there is not, using the default myisam tables. Unless you switch to another table format which supports transactions, the best you can do is to clean up afterwards when something goes wrong. http://dev.mysql.com/books/mysqlpress/mysql-tutorial/ch10.html Link to comment https://forums.phpfreaks.com/topic/40799-user-registration-mysql-failsafe/#findComment-197554 Share on other sites More sharing options...
fenway Posted March 2, 2007 Share Posted March 2, 2007 Depends what you means by "failed"... how can an insert "fail" in your case? Link to comment https://forums.phpfreaks.com/topic/40799-user-registration-mysql-failsafe/#findComment-198064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.