Home > database >  The Numbers
The Numbers

Time:10-13

Want to realize this function: a float type field to integer and decimal places to a total of 11, pay attention to the length of the integer bit is indefinite, of course can't more than 11, is also a small digital according to integer bit figures to determine how many decimal places should be retained, this should be how to, please? (dead method through the code to determine the individual feels too troublesome,)

CodePudding user response:

Is really a wonderful work demand, two solutions:
One, save the database, intercepting small digital processing after writing database
In the table 2, retain more small digital display interception, can write a function in the database, interception, decimal level when data is retrieved using the custom function transformation

CodePudding user response:

This code should be use to judge,
Not in the database is the program values,
  • Related