So lets say I want to make a script that adds credits into a database when customer pays money using some gateway like paypal.
What if there comes an error while updating the database row? For example the conection is lost. Then I could do some logging to a text file that there was an error. And write some script that reads from log file and corrects the errors - updates the database entries according to log file.
But yet - it is even possible that for some reason the log to a text file will fail, but extremely unlikely so probalbly we can ignore it.
Is there a better way for this? How pro's do that? I am new to things like this, and don't know where to read how to code such things.