Jump to content

ID field for php script


christa

Recommended Posts

No. The (4) is just a display length. If there are less than 4 digits stored, and you are using zerofill, the number would be padded with zeros to four digits. You'll still be able to store a max unsigned value of 4,294,967,295.

i'm not using zerofill, my field is unsigned.

 

plase correct me if I'm wrong:

 

value: 156

field: int(4) unsigned zerofill > value becomes 0000156

field: int(4) unsigned > value is 156

 

field: smallint(1) unsigned zerofill > value becomes 0156

field: smallint(1) unsigned > value is 156

 

Right?

 

 

 

 

It depends on the field type. Some require it, where others don't. Your best bet would to look at the manual for the field types, but if you omit one that's required, you should get an error returned to that effect.

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.