How does mysqlfloat save decimals? I set a field type to float, but insert decimals and save them to the database as integers. on the Internet, I changed float to float (5, 2) the two decimal places can be saved. there are no more than five digits. where are the five or two digits set, if I change the length to, an error is returned. ------ solution ------------------ cannot I change the length of phpmyamin? --- How does mysql float save decimals?
I set a field type to float, but insert decimals and save them to the database as integers.
I can change float to float (5, 2) on the Internet to save two decimal places with no more than five digits,
Where can I set the number 5 or 2? I changed the length to 5 or 2, and an error is returned.
------ Solution --------------------
Can I change the length of phpmyamin?
------ Solution --------------------
Create table test (float_column float (5, 2) not null default 0 );
No error is reported. For mysql 5.1