I have a field in a MySQL table that i have sent to Int(4)
The numbers are going to be starting at 0001 and going upwards.
But when i insert into the field, the leading Zero's get chopped off. How can i keep them?
Do i need to change the filed type?
Thanks
Mark
How to keep leading Zero when inserting Int into field
Moderator: General Moderators
You could always add them back, no?
Code: Select all
$var = sprintf("%04s", $var);