i have set my clothes price field to float datatype at(4,2) it doesn't let me exceed 100 it comes up with 99.99 i must be doin something stupid can some one please help.
Float doesn't go past 100
Collapse
X
-
CREATE TABLE Clothes (
Clothes_ID int not null primary key auto_increment,
Type_ID int not null,
Clothes_Brand varchar (30) not null,
Clothes_Type varchar (80) not null,
Clothes_Colour varchar (30),
Clothes_Price float (4,2) not null,
Clothes_Image varchar (150),
Clothes_Descrip tion text);Comment
-
You defined it as 4 in total length of which 2 decimals, so 99.99 is the maximum.
RonaldOriginally posted by mysql docMySQL allows a non-standard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal pointComment
-
Comment