Jump to content

my sql length attributes.


11Tami

Recommended Posts

Yes I already did it on the form itself for max characters but when people are using pad files it overrides it. Thanks for the link but it doesn't talk about which options will take the length value. The only place to fix it is the database. Just wondering why it doesn't work on text fields and if varchar length values is the only or best way. Hope someone knows.

VARCHAR and CHAR fields are the only ones that you can use to set a limit because most people that want to limit only want to limit small amounts.  if you want to limit a lot, then you have to do it the other way.  According to the link you could try setting a VARCHAR(500) and it would be treated as a TEXT field, but maybe it would still have the limit in effect?

Sort of.  The main difference between it and CHAR is that if you have VARCHAR(10) and you store 5 characters in it, then it only takes up that much space.  However if you store the same 5 characters in a CHAR(10) it will take up 10 spaces.  That is the "advantage" of the VAR = Variable as the data being stored could vary.

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.