Hello,
I am trying to make a ticket system on my site. Each ticket will have a unique number (integers). Can you advice me what is the best way to number such things?
My initial idea was to go for serial numbering in mysql database. That way no duplicate ticket can be created but the problem is when some one quits half way through, it leaves a blank space in my database which I am not able to fill up in the later stage.
For example:
As I complete the first step of ticket creation and saves data into database, my ticket get row number 17. A friend of mine doing the same thing at the same time gets row number 18. Half way through I quit, deleting row number 17. But my friend completes it. And when the next person completes it he gets row number 19. This is leaving a void row number in my database.
What would be your advice on this? Will advice me to count the total rows in mysql and to that manually add 1 and save as ticket number?
Any help will be appreciated.
Thank you,