[b]CTM[/b] - I realise that but if for whatever reason there is some kind of failiure to complete inserting of ALL users I need to take out any that may have been inserted by the loop thusfar and I'm trying to avoid going back and deleting each set of details from both tables 1 by 1 [b]shocker-z[/b] Thanks for the info - I had a quick read and tried setting autocommit to 0 but it's still not rolling back. I'm finding it pretty confusing to figure out exactly what you can and can't do with transactions. Where you quoted "Do not use transactions (e.g. with InnoDB MySQL tables) with persistent connections." does that mean I have to reconnect for each query? if so it kind of defeats the object of me trying to use rollback. Sorry if these are dumb questions, I'm no master of this stuff!