Re: FN-FORUM: Storing the leading 0 of product codes in MySQL
date posted 11th October 2006 11:46
> 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?
The simplest solution would be to use MySQL's UNSIGNED ZEROFILL option.
You can find it under "Attributes" in the field settings in phpMyAdmin.
Anthony
--
www.fonant.com - Quality web sites