Re: How to calculate size of INT(x) field
| From: | Doug Thompson | Date: | Fri, 05 Mar 2004 14:36:24 +0000 |
| Subject: | Re: How to calculate size of INT(x) field | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-33333@lists.php.net to get a copy of this message | ||
Richard,
Why do you exclude the MySQL Manual from your list of references?
See sections 6.2 and 6.2.1. In 6.2.1, you will find:
<quote>
Another extension is supported by MySQL for optionally specifying
the display width of an integer value in parentheses following the
base keyword for the type (for example, INT(4)).
</quote>
There is much more about how INT(x) works, but if I copied it all to
here you wouldn't discover the other useful information available.
Doug
On Fri, 5 Mar 2004 11:29:03 +0000, Richard Davey wrote:
>Hi all,
>
>Sorry for such a newbie question! But I have been digging through the
>O'Reilly MySQL book + MySQL Cookbook and cannot find an answer to what
>I think is a very simple question:
>
>When creating an unsigned INT field, how does the value in brackets
>(if given) limit the size of the field? I.e. what is the difference in
>possible maximum values held between an INT(10) and an INT(4)? I know
>MySQL will create an INT(10) as standard but I'm not sure I need it to
>be able to hold a number that high.
>
>--
>Best regards,
> Richard Davey
> http://www.phpcommunity.org/wiki/296.html