on-internet
← Community

How to provide ID counter starting from 1 for each new user?

Stack Overflow ·

I am implementing a multi-users website. They can create "items". When a new user registers and creates his first item I want it to have an ID of 1, not 2728 (its ID from DB). So I need some kind of mapping? E.g. | real_item_id | fake_item_id | 2728 1 So for each Account I will have a table with fake_id starting from 1 and incrementing every time a User creates an item? Maybe there is another, better approach?

Comments

Sign in or sign up to comment and upvote.

No comments yet.