|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: How to get a placeholder to keep the current column value?by Jenda (Monsignor) |
| on Oct 26, 2003 at 21:31 UTC ( #302267=note: print w/ replies, xml ) | Need Help?? |
|
What about This way the SQL is static, can be prepared and if you pass an undef for some field it'll keep the old value. Of course this would not work if you did want to be able to set some fields to NULL, but otherwise this seems to be a nice solution. P.S.: I have never worked with MySQL so I'm not sure there is a COALESCE() function there. It's supposed to return the first non-NULL parameter. Jenda Edit by castaway: Closed small tag in signature
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||