I am using data field Nr. int(10) not null autoinc. in a table
so that when user calls this field he will get this Nr. as 1,2,3---autoincrmenbts whenever he login,but i want some function in PHP so that when user login he will get 001 instead of 1 and 010 instead of 10 not as 0010.
You can do this in the database - in MySQL, you add the attribute ZEROFILL to the column declaration. I presume other databases have similar functionality.
Adam
"If you’re not using valid HTML, then you haven’t created a Web page. You may have created something else, but it isn’t a Web page." - Joe Clark
thanks for the help but i am a newbie to PHP and mySQL i tried to use
nr [tinyint(10) or int(10)] [UNSIGNED] [ZEROFILL] [No] [auto_increment ]
and when i give value to nr as 1 it always take as 0000000001
so i dont no how to reduce these much zeroes i want as 001 or please help me to write the function using PHP or how i can directly fill 001 in database.
Bookmarks