문제

I am importing a table into a phpmyadmin database as a .CSV file, the file has some values within it which are greater than 100 for example 284.543536, 694.5435432, etc... When I import the file all values under 100 get imported fine and show on the table as expected however, the values over 100 get changed to 99.99999999. I have tried to find a solution for this but am struggling, could someone please explain to me why this keeps happening.

도움이 되었습니까?

해결책

Your column is set to only allow two decimal places before the dot causing your values to be truncated. You will need to change it to allow higher numbers. decimal(10,7) would solve this issue for the numbers you have used in your example but if you plan on getting values over 1000 you will need to adjust this further.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top