Re: FN-FORUM: Storing the leading 0 of product codes in MySQL
date posted 11th October 2006 12:01
On Wed, Oct 11, 2006 at 11:06:34AM -0000, D D Glendinning wrote:
>
> Paul.
>
> Thanks for your thoughts... It is being stored as two fields because I
> need to be able to order by the number when the products are listed..
> Thats also the reson why I can't store the number as text, or else it
> won't oder numerically.
If you store it as text and *always* put the leading zeros in, then
a text sort will sort the same as a numeric sort.
--
Alain Williams
Parliament Hill Computers Ltd.
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 http://www.phcomp.co.uk/
#include