Thank you for reporting back LemonParty.
Note that I specially mentioned the link in the wiki to get yourself acquainted with transactions as the wiki article explains what a transaction actually does.
Now, that might or might not be applicable to your situation f.e. because you are working with a local database but it definitely comes into play when working with a remote database. You can setup your code so that there is no need to (manually) perform transactions but that is usually an undesirable situation for remote servers.