MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Baron Schwartz Date:September 30 2007 3:03pm
Subject:Re: Having trouble storing monetary values...
View as plain text  
Rick Faircloth wrote:
> Hi, all.
> 
>  
> 
> I'm having trouble storing monetary values.
> 
>  
> 
> When MySQL 5.0 stores the entered value of 5.23,
> 
> it storing it as 5, dropping off the values after the decimal.
> 
>  
> 
> The field is the decimal type with 2 specified as the number
> 
> of values to store after the decimal.
> 
>  
> 
> Can anyone provide some clues on how to set up the field
> 
> or any other changes I need to make to properly store
> 
> the monetary values?

Please send us the exact column definition from SHOW CREATE TABLE.  You 
should be able to use a definition like DECIMAL(10,2) or similar.

Baron
Thread
Having trouble storing monetary values...Rick Faircloth30 Sep
  • Re: Having trouble storing monetary values...Baron Schwartz30 Sep
Re: Having trouble storing monetary values...Baron Schwartz1 Oct
  • RE: Having trouble storing monetary values...Rick Faircloth1 Oct