Originally posted by mrhappiness
That's possible only if you tell them the highes value of your user table or if yu at least tell them the value of their own entriy's primary key
If they just signup again, or complete a transaction, they get the next incriment in theory.
It's easy recon. People do this all the time to their competitor. Get good knowledge on people's business.
Do it a few times in a day to see the usage rates, etc.
Dishonest? Yea, technically. But it's part of life. It's an insecure design.
Why should you do so?
Why not use auto_increment internally and generate a customer-number or anything similar using the cureent year for example?
id | cust_no
1784 | 20041246
1785 | 20041247
8794 | 20051587
which woulkd (technically) mean that customer 20051587 is the 1587 you aquired in 2005 and he has the id 8794 internally
[/B]
Why keep both? cust_no has to be unique anyway (otherwise it's completely useless. what purpose does id serve?
The question is how to generate a good unique cust_no. So that there's no data being leaked (signup date/time, # of current customers, etc.)
Where do you populate the value of the primary key itself and why?
Not doing it yet, this is called research. 😃
Better than writing an insecure system by using auto num.