Jump to content

[SOLVED] Length/Values-What on earth is it?


xstevex

Recommended Posts

Hi,

 

I was instructed by someone to do some modifications to my database, now I can't get in contact with him to ask some more questions. What he said was:

 

"...First, you have to change the database rating to type Double, length 7 dec 6."

 

The "rating" is the name of the field. And I know "Double" is set in Type.

 

What I don't know is "length 7 dec 6" but I assume this refers to the Length/Values settings. If so would I type this in as "7.6"? I have no idea.

 

Please advise if you know what "length 7 dec 6" would mean.  ???

 

Steve

 

 

Link to comment
https://forums.phpfreaks.com/topic/84259-solved-lengthvalues-what-on-earth-is-it/
Share on other sites

Hi Fenway,

 

Thanks for your answer. So I would have the significant figures set to 7 and the decimals of those "sig-figs" would be 6. So seven figures total, of which six would be decimals. One integer and six decimals.

 

How do I tell this to MySql in the Length/Values area?

 

I'm guessing I write it in as "7,6"

 

Steve.

From this link:

 

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

 

 

MySQL allows a non-standard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal point. For example, a column defined as FLOAT(7,4) will look like -999.9999 when displayed. MySQL performs rounding when storing values, so if you insert 999.00009 into a FLOAT(7,4) column, the approximate result is 999.0001. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.