I thought i saw a post somewhere about forcing dbman to store the number zero in a database. i have a numeric field that is required, but zero is a valid entry. negative numbers are not. only positive integers and zero. dbman changes zero to blank and stores empty field. i am using file upload mod and have read that may be causing problem? can someone point me in right direction? thanks
Mar 16, 2005, 10:40 AM
Veteran / Moderator (8669 posts)
Mar 16, 2005, 10:40 AM
Post #2 of 4
Views: 2386
I did some searching and I think I found the answer.
http://www.gossamer-threads.com/...orum.cgi?post=241703 says
I think you should replace your
unless ($value) { next PAIR; }
with
unless ( length ($value) ) { next PAIR; }
This would be in sub parse_form.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
http://www.gossamer-threads.com/...orum.cgi?post=241703 says
Quote:
I think you should replace your
unless ($value) { next PAIR; }
with
unless ( length ($value) ) { next PAIR; }
This would be in sub parse_form.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
Mar 16, 2005, 12:25 PM
Veteran / Moderator (8669 posts)
Mar 16, 2005, 12:25 PM
Post #4 of 4
Views: 2374
I don't think it matters. It seems to compile either way.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.
JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.