Quote:
Originally Posted by r937
nope, sorry
you really only need one unique column, not two
if you're going to assign your own orderno, you won't need an auto_increment as well
|
I understand that, but that isn't what I was asking...
I don't want order numbers that go 1, 2, 3,...
They should be fixed-width (e.g. 853021, 853022, 853023,...)
And they should start at some number high enough so it doesn't look like we just started our business?!
If I have an ID and use Auto-Increment, can I...
1.) Start the Auto-Increment at a number higher than 1?
2.) Pad the Auto-Increment Number so it is fixed width?
If I cannot do those things, then what is the best way to generate an OrderNo so that it is reliable and there aren't any issues with concurrent users creating duplicate OrderNo's. (I'd guess that I need to use "Transaction Processing" in MySQL, right?)
TomTees