JudgementDay Posted February 4, 2012 Share Posted February 4, 2012 Can decimals be used with the INT data type? Link to comment https://forums.phpfreaks.com/topic/256377-decimals-and-int/ Share on other sites More sharing options...
JudgementDay Posted February 4, 2012 Author Share Posted February 4, 2012 So, could "21.50" be used in a row set to INT or would it need to be in a row set to VARCHAR? Link to comment https://forums.phpfreaks.com/topic/256377-decimals-and-int/#findComment-1314396 Share on other sites More sharing options...
Andy-H Posted February 4, 2012 Share Posted February 4, 2012 You can use decimal or double with length 10,2 (the value before the comma being the integer length and the value after being the float precision) i.e. 10,2 would allow up-to 9999999999.99 Link to comment https://forums.phpfreaks.com/topic/256377-decimals-and-int/#findComment-1314408 Share on other sites More sharing options...
Pikachu2000 Posted February 4, 2012 Share Posted February 4, 2012 Integers are whole numbers. MySQL numeric data types Link to comment https://forums.phpfreaks.com/topic/256377-decimals-and-int/#findComment-1314409 Share on other sites More sharing options...
JudgementDay Posted February 6, 2012 Author Share Posted February 6, 2012 Thanks for the information. Link to comment https://forums.phpfreaks.com/topic/256377-decimals-and-int/#findComment-1314935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.