Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to properly define the [float] data type in mysql

I defined (through PHPMYADMIN) a field with the float data type.
When I try to insert a number as 78.556677099932222377 it will translate it to 79.
How do I make it to save the correct number, at least 7 places after the decimal dot?

like image 733
Itay Moav -Malimovka Avatar asked Dec 12 '22 11:12

Itay Moav -Malimovka


1 Answers

Open phpMyAdmin with structure option and define the float as:

FLOAT(23,19)

clear in this picture: enter image description here

like image 134
Amranur Rahman Avatar answered Dec 31 '22 09:12

Amranur Rahman