PDA

View Full Version : 0000 Turns to 0 with INT


As5a5sIn5
08-31-2004, 05:09 PM
Okay I need an id that is 4 (four) digit id but when I put 0000 its turns to 0 how to I avoid this :confused:

raf
08-31-2004, 08:38 PM
0000 is not an integer... so if you put it in an integer field ...

2 options: stor it in a varchar(4) or add the 000 serversided

Kiwi
09-01-2004, 11:48 AM
Use something like this in your table definition:
invoice_number INTEGER(4) UNSIGNED ZEROFILL NOT NULL

As5a5sIn5
09-01-2004, 06:12 PM
thanks...all