I am in need of some help, I have tried all sorts of things, but I'm new so I don't know much. I've got a customer database, and I need a unique customer ID each time I insert a new customer into the database, and it needs to look like this:
Code:2010290701Code:2010290702The first bit is today's date, and the bold stuff is the unique number I will be getting. So if I insert 10 customers today, the last customer ID will be:Code:2010290703
I will NOT be inserting more than 99 customers each day, so this is not a problem. But I need the script to check if today's date already exists, if so, check which number was used last, and then add a new number plus 1. So, if the following ID was used last ->Code:2010290710
2010290703-> Then the next ID would be this number plus one, so it would become ->
If today's date has NOT been used yet, it needs to be today's date with 01 at the end.
Hopefully someone understands and can point me in the right direction so I can fix this finally
Thanks in advance for the help!