Leading Zeroes
am 27.04.2007 15:01:05 von Kevin Marks
I have a form field that takes the Credit Card ID from the back of the card.
Sometimes this number begins with a zero. When the data goes from the form,
there are only two digits left. Is there a way to keep the leading zero?
Re: Leading Zeroes
am 27.04.2007 15:24:24 von a.nony.mous
Kevin Marks wrote:
> I have a form field that takes the Credit Card ID from the back of the
> card. Sometimes this number begins with a zero. When the data goes
> from the form, there are only two digits left. Is there a way to keep
> the leading zero?
Where are you not seeing the leading zeros? In your database? In an
email sent to you upon submit?
My database philosophy has always been "if you don't need to do math
with it, make it a character field." Like zip/postal code fields.
Numeric fields will (almost) always strip leading zeros.
--
-bts
-Motorcycles defy gravity; cars just suck
Re: Leading Zeroes
am 27.04.2007 16:59:35 von Kevin Marks
I think that was it. I had the field set as a number rather than a character
field. Thanks!
"Beauregard T. Shagnasty" wrote in message
news:cQmYh.372872$5j1.335102@bgtnsc04-news.ops.worldnet.att. net...
> Kevin Marks wrote:
>
>> I have a form field that takes the Credit Card ID from the back of the
>> card. Sometimes this number begins with a zero. When the data goes
>> from the form, there are only two digits left. Is there a way to keep
>> the leading zero?
>
> Where are you not seeing the leading zeros? In your database? In an
> email sent to you upon submit?
>
> My database philosophy has always been "if you don't need to do math
> with it, make it a character field." Like zip/postal code fields.
> Numeric fields will (almost) always strip leading zeros.
>
> --
> -bts
> -Motorcycles defy gravity; cars just suck