I have a little situation here. If in my database in my "Session" Table if I have the data below:
SessionId
C
Then what happens with my code is that it would not display the string above when user generates a new string as that it is already in the database. This works fine for example above
The problem I have though is that if I have multiple sessions(exams), then in the database below it will display the strings as below in the database:
SessionId
C1
C2
C3
The above is for 3 exams. But the problem is that the string "ADERF" can still be generated in the code below. What my question is that if there is a number at the end of the string like the table above, then how can I not generate the string as it is still in the database? The strings will always be 5 characters long: