简体   繁体   中英

Barcode input into database fails in php

When i scan a barcode in "form" it automatically inserts it in database but two first digits are missing (two first zeros) . So , for example if a barcode 0020166196800002 is scanned and inserted into database only number 20166196800002 is inserted without first two digits of "00". Please, help!

Databases do strip leading zeros if the column type is numeric and there is no zero padding configured.

For example, MySQL allows a column to be defined with "zerofill(x)", which results in every number being at least x digits long, and a stored zero will come up as x 0 characters instead of only one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM