go ahead... be a heretic | |
PerlMonks |
class-dbi-mysql and null valuesby davidj (Priest) |
on Nov 05, 2006 at 07:35 UTC ( [id://582289]=perlquestion: print w/replies, xml ) | Need Help?? |
davidj has asked for the wisdom of the Perl Monks concerning the following question:
Hey everyone, I've just started using class-dbi for some work stuff and I'm still trying to get used to some of its functionality. The problem I'm having is getting a column value updated to a NULL value. In the webapp update form, when a value from a particular field is removed, I need the corresponding value for that field value in the database to be set to NULL. I'm updating the value as per class-dbi: However, this sets the value to an empty, non-null value which will cause a search on NULL to fail. If I put NULL as a value in the code, I get the bareword error: I've made the following changes in the class file to hack a workaround: to This hack will make it work for my application, but it breaks other applications that require a NULL value in the field since the field does not, in fact, have a NULL value. There's got to be a way to do it. I just don't know what it is. As always your assistance is much appreciated. davidj
Back to
Seekers of Perl Wisdom
|
|