Re: FN-FORUM: Storing the leading 0 of product codes in MySQL
date posted 11th October 2006 11:10
Quoting D D Glendinning [EMAIL REMOVED]
> Morning all again,
>
> Right, I am storing products codes, split into two fields, one for
> characters, and one for digits.. The problem is that I need 01 stored
> as 01 and not as 1, and sadly I can't store it in the characters
> field... so is there a field type that preservers the 0?
Er... yes - text :)
If the leading zero is significant, then what you have is a string of
digits. It isn't a number. It should therefore be stored in a text
field.
Dave...
--
Magnum Solutions Ltd
Open Source Consultancy, Development and Training
http://mag-sol.com/