Jump to content

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


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. 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.