Let me repeat to see if I understood:
You want to generate unique keys yourself (IOW mysql autoincrement is not OK for your purpose). What is the format of the key and what are the rules for constructing the key?
then the new one created key must be from deleted keys
If this is the requirement then you have to keep the list of the deleted keys. If you keep it in a database table then just query for first available key.
broj1
Nearly a Posting Virtuoso
1,216 posts since Jan 2011
Reputation Points: 167
Solved Threads: 165
Skill Endorsements: 13