solidcodes — 2013-09-03T19:30:44-04:00 — #1
Why I can't limit the length of TEXT type in phpmyadmin?
Is this a bug?
I entered like this,
and also I tried like this,
When I view the structure of the table it shows like this,
Isn't it suppose to be look like this?,
Can someone explain please.
r937 — 2013-09-04T14:33:24-04:00 — #2
those numbers in parentheses behind some datatypes might be making you think that they somehow "limit" the number of characters or digits that the column can hold
this is ~not~ what they do for integer datatypes
INT(4) and INT(10) and INT(937) will all hold exactly the same range of numbers
the numbers in parentheses behind CHAR and VARCHAR are required and ~do~ limit the length of the values
numbers in parentheses behind TEXT and BLOB and their similar datatypes are not permitted
solidcodes — 2013-09-04T19:25:02-04:00 — #3
It's really nice to hear the answer from a master.
Thanks again master.
solidcodes — 2013-09-04T19:30:08-04:00 — #4
By the way, so what is the use of the integer length?
INT(4) and INT(10) and INT(937)
felgall — 2013-09-04T22:13:04-04:00 — #5
If you use it with a padding option then the number gets padded out to the specified length if it is shorter. If you don't use it with a padding option then it makes no difference at all.
r937 — 2013-09-04T22:19:17-04:00 — #6
solidcodes — 2013-09-04T22:41:38-04:00 — #7