[eluser]JamesTaylor[/eluser]
I'm storing some numeric data which will usually be whole numbers, but on a few occassions it may be a decimal.
At the moment i have the DB field set to 'Decimal(5,2)'
When i display the values on my page it always shows the decimal, but if its a whole number i would prefer it just to display as a whole number without the deciaml places...
i.e:
72 should display as 72
not 72.00
72.35 should display as 72.35
is there a way to achieve this whilst still using a numeric data type, i'm quite happy to change the datatype to INT / FLOAT etc if needed.
Otherwise i thought perhaps it would be best just to have the datatype as varchar - as it stands i can't see any numeric opperations being required on the values as they are just final scores from golf competitions... but equally i don't want to rule out the ability if i don't have to.
Thanks
James