![]() | |
#1
| |||
| |||
|
|
Well, you defined the field to take a maximum of 99.99. What do you expect MySQL to do? If you want to put 140 in there, you need to leave room for three digits to the left of the decimal point. |
#2
| |||
| |||
|
|
Well, you defined the field to take a maximum of 99.99. What do you expect MySQL to do? If you want to put 140 in there, you need to leave room for three digits to the left of the decimal point. Maybe I am misunderstanding, but isn't that what I did by defining my data type as: double(4,2)??? Doesn't that mean 4 numbers to the left of the decimal place, and 2 numbers to the right??? Don't tell me it means 4 total digits with 2 decimal spots... Nino |
#3
| |||
| |||
|
|
On 9 Jan 2007 10:37:07 -0800, nino9stars (AT) yahoo (DOT) com wrote: Well, you defined the field to take a maximum of 99.99. What do you expect MySQL to do? If you want to put 140 in there, you need to leave room for three digits to the left of the decimal point. Maybe I am misunderstanding, but isn't that what I did by defining my data type as: double(4,2)??? Doesn't that mean 4 numbers to the left of the decimal place, and 2 numbers to the right??? Don't tell me it means 4 total digits with 2 decimal spots... That's exactly what it means, though. |
#4
| |||
| |||
|
|
Yes, when specifying the size, the first number is the total size (digits) and the second is the precision (number of digits to the right of the decimal point). See http://dev.mysql.com/doc/refman/5.1/...ric-types.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |