Shelley wrote:
Hi all,
Is there any difference between int(1) and int(11) when creating a table?
I checked the mysql manual and got that 1 and 11 are used to specify the
display width of an column.
Is there any other difference?
Straight from the manual:
The display width does not constrain the range of values that can be
stored in the column, nor the number of digits that are displayed for
values having a width exceeding that specified for the column. For
example, a column specified as SMALLINT(3) has the usual SMALLINT range
of -32768 to 32767, and values outside the range allowed by three
characters are displayed using more than three characters.
As the manual says also, be careful using different sizes with zerofill.
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php