S
S
Se_5552016-11-15 23:02:42
PHP
Se_555, 2016-11-15 23:02:42

Is the length of the decimal value set incorrectly?

Hello.
There was a problem setting the decimal options.
On localhost I choose the decimal type, the length of the value is 5.2 , and decimal(5,2) is set.
On the external server, I also choose the decimal type, the length of the value is 5.2, when saving it does not give an error, but the length of the value changes to 5.0.
What could be the problem, where to look?
Already deleted tables and created new ones, does not help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrew, 2016-11-16
@R0dger

Rather, you need to specify which database you have on the local and which one on the hosting + show how you create the table

S
Se_555, 2016-11-18
@Se_555

I didn’t quite understand what exactly is needed, in general, below are the screenshots, 5 from localhost and 5 from external (this is the first time I encounter this)
local 1:
local 2:
local 3:
local 4:
local 5:
server 1:
server 2: line_1 and line_2 values ​​separated by commas, line_3 separated by a dot
server 3: when saving the values ​​changed to 5.0 , no error was thrown
server 4: respectively, should be inserted without a fractional part
server 5: it was inserted without a fractional part
f856c223ae4542df8bfcc35372e502dd.JPG

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question