Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by edan (Curate)
on Oct 26, 2003 at 10:13 UTC ( #302190=note: print w/ replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://302190]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2014-09-17 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (56 votes), past polls