What do I need to store such amounts, such as: $ 1,200,000, $ 1,000 and $ 14.56? ($ dosn't count, it will be deleted)
not to do. Store as int and multiply / divide by 100. For example. Store 14.56 as 1456, but / 100 when displayed. A floating point for storing currency simply requires rounding problems.
Try DECIMAL. See http://dev.mysql.com/doc/refman/5.1/en/numeric-types.html
Source: https://habr.com/ru/post/1735476/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1735470/replace-a-links-to-images-with-img-tags&usg=ALkJrhiCsRAeahjJAB1-LAWJne5NEURmHQAutomatically detect product data for an arbitrary e-commerce site? - screen-scrapingHow to determine if the contents of a .pdf file is checked or not. - phpShell Script - save variable substring - scriptingNSDrawer prevents resizing - objective-cBackground process in asp.net - c #passing a string parameter when calling a method in asp.net - c #change text input text in textarea like in facebook - javascriptHow to map this class in NHibernate (not FluentNHibernate)? - nhibernateHow to sort an array based on a specific field in an array? - arraysAll Articles