0

hello,

our site have 1000 users.here i have to give unique numbers from '000' to '999' to each user.
now i am adding from starting '000'. how can i give unique numbers to users when adding and updating users?

Thanks

Edited by muralikalpana

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by diafol
0

I agree, storing 000 as a PK doesn't really make sense as a rule. You can use str_pad() to give leading zeroes if you really have to. I'd advise NOT using these leading zeroes in any part of your DB tables. It should be just a cosmetic thing for screen output. Or do you have a different use in mind?

This topic has been dead for over six months. 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.