json - mysql cant save my big decimal number -
i have number 34.59704151614417
and put datatype on decimal(16,14) has saved 34.59704151614400
it means mysql save 12 digit decimal array
array (
[geometry] => array ( [type] => polygon [coordinates] => array ( [0] => array ( [0] => array ( [0] => 32.34375 [1] => 48.690960390925 ) [1] => array ( [0] => 16.875 [1] => 34.597041516144 ) [2] => array ( [0] => 43.2421875 [1] => 31.653381399664 ) [3] => array ( [0] => 64.3359375 [1] => 40.97989806962 ) [4] => array ( [0] => 32.34375 [1] => 48.690960390925 ) ) ) ) )
i understand after json_decode of array reduce it's digit 12 number
set precision directive:
ini_set('precision', 16);
it 14 , that's why decimals reduced. check this link more information
Comments
Post a Comment