Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

INT UNSIGNED DEFAULT NULL

Quote Reply
INT UNSIGNED DEFAULT NULL
In my LinksSQL, I added a field called "Price". It was defined as:
Price INT UNSIGNED DEFAULT NULL,

When a visitor added a link and left this field blank, there was no problem. When I viewed the link in admin, this field was blank.
However; if later he modified his link and left this field blank again, this field would be automaticly filled with '0'. I also couldn't modified it to be blank in admin.

Any idea? Thanks!
Quote Reply
Re: INT UNSIGNED DEFAULT NULL In reply to
The way INT is handled, the "null" becomes a '0' value.

It won't be easy trying to keep that field 'null' You'd be better off using the '0' as your non-value, or entering a negative number perhaps.