http://www.perlmonks.org?node_id=302190


in reply to How to get a placeholder to keep the current column value?

I realize that you already seem to have decided to dynamically generate the queries (which seems like the right solution to me, too), but I still want to make a point here for future reference...

Of course, I could always fetch the old values from the record in the database first, but I feel that sort of defeats the purpose. Or would it?

This is a bad idea, unless you plan to implement a lock on the rows (or tables) in question between the select and subsequent update, since someone else could update the row in between your 2 operations, and then you'll stomp on their update.

--
3dan

  • Comment on Re: How to get a placeholder to keep the current column value?