|Keep It Simple, Stupid|
Re: Making credit processing atomicby RazorbladeBidet (Friar)
|on Apr 12, 2005 at 16:37 UTC ( #447084=note: print w/replies, xml )||Need Help??|
You can make your update/insert a transaction. Depending on your database, start the transaction, execute the statments, and commit ONLY if both succeed. Otherwise you have an error.
Any database error after transaction approval should be a system error and complete rollback. Unless, of course, you want to try again.
Are you also settling the credit card?
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."
In Section Seekers of Perl Wisdom