Posts: 36
Threads: 7
Joined: May 2016
Reputation:
0
My house system is a bit buggy because the X,Y,Z coordinates don't save properly in MySQL field..
0 at the end is being deleted, sometimes last two digits..
I have tried using FLOAT or DOUBLE, nothing works
Any help would be appreciated
Posts: 678
Threads: 16
Joined: Apr 2014
Reputation:
0
"Am I supposed to guess your code?"
Posts: 63
Threads: 4
Joined: Jul 2008
Reputation:
0
It is saving properly, its rounding the decimal numbers.
Posts: 6,242
Threads: 8
Joined: Jun 2008
You probably need to specify to what length the decimals go in the MySQL field itself.
You will need to submit some code anyway, as we need to check the storage/obtaining of the coords.
Could be an idea to show some of the settings for that field in the DB.
Posts: 6,242
Threads: 8
Joined: Jun 2008
^^ Yea, this is the sort of thing I was hinting towards.
Posts: 36
Threads: 7
Joined: May 2016
Reputation:
0
If I change it to decimal, then it doesn't support dot so it could only be 6404 instead of 6404.930664 although I increased the length to match it.. Changing decimal value while table is set to float seems not to be possible
It is not my MySQL version for sure, I tried different one already
Yeah, I need exact coordinates because it's a house position heh