geroido Posted July 23, 2008 Share Posted July 23, 2008 Hi Can anyone tell me what data type I should use in my table to insert proper currency values. Everytime I enter a value like 19.99, mysql rounds it to 20 which I don't want. Quote Link to comment Share on other sites More sharing options...
paul2463 Posted July 23, 2008 Share Posted July 23, 2008 if the column was float(6,2) that should do it for you Quote Link to comment Share on other sites More sharing options...
accident Posted July 23, 2008 Share Posted July 23, 2008 actually use decimal, never use float for currency. So for example decimal(10,2) Quote Link to comment Share on other sites More sharing options...
geroido Posted July 23, 2008 Author Share Posted July 23, 2008 Thanks The data type was Decimal but had 10,0 in it as default. Works great now. Much appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.