Don't ask to ask, just ask | |
PerlMonks |
Re: How to get a placeholder to keep the current column value?by gmax (Abbot) |
on Oct 26, 2003 at 10:06 UTC ( [id://302187]=note: print w/replies, xml ) | Need Help?? |
Fetching the old values or using column names for dummy updates sounds like a waste of resources to me. Since I guess that you can get the XML nodes into a hash, I would go for the simpler solution, using a dynamically built SQL statement. Here is a (tested) example of creating a query with placeholders using a well established idiom. (See DBI recipes for more on this subject.)
Provided that the keys in your hash have a corresponding column name, you can add or remove keys at will, and this kind of code will work smoothly. Update _ _ _ _ (_|| | |(_|>< _|
In Section
Seekers of Perl Wisdom
|
|