M
Mick
is it possible to configure a number field to take a normal credit card number
5544667788998877 i.e. a 16 digit integer?
5544667788998877 i.e. a 16 digit integer?
I'm sorry.
if the credit card number.. and you're not gonig to do math on it..
then it should be _MATH_?
I just don't agree with your declaration.
If your database can't fit a real number- then get a real database.
It's a credit card _NUMBER_. What if someone tries to put TEXT in the
field? Is it necessary to enforce business rules like this in multiple
places? I think that it is considered a best practice-- to use the
best datatype for the job.
The best datatype (BIGINT) is extremely fast compared to text.
and again-- it increases / ensures the _QUALITY_ of the data.
If your midget-sized database can't fit a (PRACTICAL) number then
upsize upsize, upsize!
-Aaron
a said:How is it _NOT_ that storing it as a number as INT-- is 1/3 of the
storage space of a varchar(11)?
Do you not give a crap about wasting 2/3rds of your storage space?
Stop making excuses dude.. Just because your database won't fit it--
doesn't mean that you should stoop to using a looser datatype than
the
optimal datatype.
And seriously.. SQL INJECTION-- if you just let numbers in the
fields;
then you lower the chance of injection.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.