Have you tried printing the query that inserts the numbers?
Like Keegan said, you might be having a problem with PHP subtracting the numbers before giving them to MySQL. I don't think it's a quote problem, because MySQL has a way of complaining about unquoted strings.
Also, if you get the numbers in PHP as Interegers, then all leading zeros will be removed.