jim.davidson Posted June 20, 2007 Share Posted June 20, 2007 I'm a newbie and I'm not sure which data type to use for fields that contain percentages and money. Example state tax field might be .02 or .045 price field anywhere from .01 to 1,000,000.00 Do I use smallint int signed, unsigned, and how do I define to decimal places Thanks for any help Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/ Share on other sites More sharing options...
Illusion Posted June 20, 2007 Share Posted June 20, 2007 DECIMAL UNSIGNED and DOUBLE UNSIGNED are of interest. Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/#findComment-278529 Share on other sites More sharing options...
jim.davidson Posted June 20, 2007 Author Share Posted June 20, 2007 thank you Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/#findComment-278533 Share on other sites More sharing options...
jim.davidson Posted June 20, 2007 Author Share Posted June 20, 2007 If I use decimal unsigned, what I read tells me that it's stored as a string. Does that mean that I would have to convert it to do any calculations with it (add, subtract, multiply, or divide)? Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/#findComment-278749 Share on other sites More sharing options...
bubblegum.anarchy Posted June 21, 2007 Share Posted June 21, 2007 no Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/#findComment-278990 Share on other sites More sharing options...
jim.davidson Posted June 21, 2007 Author Share Posted June 21, 2007 Thanks Bubblegum Link to comment https://forums.phpfreaks.com/topic/56394-solved-simple-field-type-question/#findComment-279281 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.