Okay idk if it's possible but I want one of my fields to have 000 as a default value and to maintain this value whenever called for. Like if I use PHP to run a query that asks for that field I want it to return "000". I'm doing this coz I'm playing with version records here.

OK so there's this thing called Zerofill, but I want it a little different. I want this field to be able to store INTEGER(5), but default value "000", a three-digit zeros. So if user do not enter any number, it will be "000", but user MAY enter up to 5 digits....

Edited by AdventDeo: n/a

8 Years
Discussion Span
Last Post by network18

hey its impossible to have any integer number '0' stored as '000' because it wil violate its defenition.
The easy way to have the db it that way, store '0' and display it '000' when it comes to scripting.
hope this might help you.


Hmmm.... I guess that can work huh... thanks dude! =)
case closed!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.