davidj has asked for the wisdom of the Perl Monks concerning the following question:
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:$case->owner( $q->param('owner') ); ..... $case->update;
I've made the following changes in the class file to hack a workaround:$case->owner(NULL); ..... $case->update;
toHandoff::Cases->set_sql('unowned', qq{SELECT * FROM cases WHERE owner IS NULL
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.Handoff::Cases->set_sql('unowned', qq{SELECT * FROM cases WHERE owner IS NULL OR owner=''
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: class-dbi-mysql and null values
by davidj (Priest) on Nov 05, 2006 at 12:04 UTC | |
by davidrw (Prior) on Nov 05, 2006 at 13:19 UTC | |
|
Re: class-dbi-mysql and null values
by tinita (Parson) on Nov 05, 2006 at 11:01 UTC | |
by davidj (Priest) on Nov 05, 2006 at 11:46 UTC | |
|
Re: class-dbi-mysql and null values
by fmerges (Chaplain) on Nov 05, 2006 at 11:36 UTC | |
by davidj (Priest) on Nov 05, 2006 at 12:08 UTC | |
|
Re: class-dbi-mysql and null values
by Anonymous Monk on Nov 05, 2006 at 09:08 UTC | |
by davidj (Priest) on Nov 05, 2006 at 09:52 UTC |