I have a table that should contains a number with a decimal point in it, i.e. 59.6 but the table is displaying 60 as the number. How can I set up the table columns to reflect the correct information so that it can be pulled properly in a php script. Thanks.
Lead Developer of PHP-Fusion Developer Tweet: https://twitter.com/phpfusion_tweet
You have 2 choices to fix this problem.
If your numbers are for price - change column type to DECIMAL length values "10,4" default values 0
If your numbers are for arithmetic calculations - change column type to FLOAT length values 10 default values 0.
The downside for DECIMAL is it will not handle sum well. i.e. 1/3 x 3 = 3/3 = 1, decimal will return 99.999999 instead of 1. While, the float will calculated as 1, as it is designed to handle fraction calculations.
You can view all discussion threads in this forum. You can start a new discussion thread in this forum. You cannot reply in this discussion thread. You cannot start on a poll in this forum. You cannot upload attachments in this forum. You can download attachments in this forum.