Mutley Posted June 16, 2008 Share Posted June 16, 2008 I've tried INT but it removes the decimal, I'm wanting to do a SQL query so when I order by that field it does like so: 12.4 12.1 11.3 9 5.4 5 4 But with a Varchar it puts the highest numbers with more than 1 digit at the bottom, same with char. Which is best to use? Link to comment https://forums.phpfreaks.com/topic/110461-best-field-type-for-number-decimal/ Share on other sites More sharing options...
rhodesa Posted June 16, 2008 Share Posted June 16, 2008 i think you are looking for DECIMAL http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html Link to comment https://forums.phpfreaks.com/topic/110461-best-field-type-for-number-decimal/#findComment-566714 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.