Jump to content

Simple problem. 00's won't show up before other numbers when added to DB?


kernelgpf

Recommended Posts

Subject says it all. I need help quickly, I've got a project due at 2, and just came across a strange problem. When I try to insert a number into the DB, say "009909" or something, if there are "0"s before it, it deletes them automatically and inserts the remaining number into the DB. I DON'T want it to do this, how can I stop it?
What type of field are you using to store the numbers? int, varchar, text ect.??


If the 0's in front of your number is used to ensure the numbers are sorted in numeric order you could just used a field which is an "int". It handles numbers correctly. Like 10 is lager than 2 ect.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.