abdfahim Posted November 11, 2007 Share Posted November 11, 2007 When I want to add a null/Empty value in a INT/Float type field, it insert a Zero (0) there, Irrespective of setting NULL or NOT NULL. How can I insert a null in a float type field? Link to comment https://forums.phpfreaks.com/topic/76848-solved-null-value-in-floatint-type-field/ Share on other sites More sharing options...
nuxy Posted November 11, 2007 Share Posted November 11, 2007 Well, it could be that you assigned a default value to that column. That means, by default it will be "The value" irrespective of whether it is aligned to be a null value. Try removing the default value of that column, and then try again inserting a null/empty value. Link to comment https://forums.phpfreaks.com/topic/76848-solved-null-value-in-floatint-type-field/#findComment-389086 Share on other sites More sharing options...
abdfahim Posted November 12, 2007 Author Share Posted November 12, 2007 well, in DEFAULT field .. if I keep blank, it automatically show NULL in DEFAULT field. And it insert zero (O) in that field. I attach my sql queries here .. If I put INSERT INTO abc (`column1`,`column2`) VALUES ('aa','') It inser Zero in the field column2, If I put INSERT INTO abc (`column1`) VALUES ('aa') It inser "NULL" in the field column2. Link to comment https://forums.phpfreaks.com/topic/76848-solved-null-value-in-floatint-type-field/#findComment-389671 Share on other sites More sharing options...
fenway Posted November 19, 2007 Share Posted November 19, 2007 When I want to add a null/Empty value in a INT/Float type field, it insert a Zero (0) there, Irrespective of setting NULL or NOT NULL. How can I insert a null in a float type field? You have to make sure the column was defined properly. Link to comment https://forums.phpfreaks.com/topic/76848-solved-null-value-in-floatint-type-field/#findComment-394437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.