Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Asking what datatype should I used?

Question posted by: lotus18 (Site Addict) on July 2nd, 2008 11:45 AM
Hello World!

I am currently working on a field that contains 'Prices'
I declared its datatype as double, Length=7 and Decimals=2and it works fine but a problem arises when the decimal contains a fixed .00

This is working:
Code: ( text )
  1. 789.69
  2. 56.36
  3. 7853.15

When I insert new values
Code: ( text )
  1. 789.00 becomes 789
  2. 56.00 becomes 56
  3. 7853.00 becomes 7853


Rey Sean
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
amitpatel66's Avatar
amitpatel66
Moderator
1,854 Posts
July 2nd, 2008
11:53 AM
#2

Re: Asking what datatype should I used?
Convert the data in to two decimal places while fetching from the table? What happens in this case?

Reply
Reply
Not the answer you were looking for? Post your question . . .
183,969 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
Top MySQL Forum Contributors