Jfisher446 Posted November 18, 2006 Share Posted November 18, 2006 I am trying to get prices imported into a table. I set the type as Integer but it is rounding up the decimals as opposed to including them. I read the mysql manual regarding numeric types and from what I can tell I need to change the precision of it but theres not an option for that so I simply think that I am reading the wrong sections and can't find what I need. How can I keep the decimals in the data? Also is there anyway when pulling the prices from the table to include commas (some data is in billions of dollars)?Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/27666-integer-type-in-mysql-not-allowing-decimals-how-do-i/ Share on other sites More sharing options...
Zane Posted November 18, 2006 Share Posted November 18, 2006 look at the datatypes FLOAT, DECIMAL, and DOUBLE Quote Link to comment https://forums.phpfreaks.com/topic/27666-integer-type-in-mysql-not-allowing-decimals-how-do-i/#findComment-126528 Share on other sites More sharing options...
Barand Posted November 18, 2006 Share Posted November 18, 2006 As for the commas, do not store the numbers with commas in the db. Format on output.http://www.php.net/number_format Quote Link to comment https://forums.phpfreaks.com/topic/27666-integer-type-in-mysql-not-allowing-decimals-how-do-i/#findComment-126573 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.