Forum Discussion

TomLeick's avatar
TomLeick
Qrew Member
3 years ago

Multiple Counter Values

Hi, I am currently trying to make a program that uses an ID in order to identify a specific item.  My ID follows the following format: www-xx-yy-zzz.
For example, a yellow highlighter might have the ID 001-01-01-001. 
The method behind the ID is that www designates the category, xx designates the class, and yy designates the division. The zzz part is meant to be a the number that the item was added under those three categories. 
Continuing with my highlighter example:
The yellow highlighter was added first so its ID was 001-01-01-001
You now want to a red highlighter so its ID would be 001-01-01-002
I want the last number to be auto generated from the first 3 categories.

How would I go about doing this? My first idea was to create a separate table containing all the IDs for the first 3 categories and a counter that goes along with each ID.

------------------------------
Tom Leick
------------------------------

5 Replies