Click here to Skip to main content
15,913,027 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys,

I am trying to check if the user which tries to register for a lesson is already registered for this lesson.

For example, a user tries to log on for the same lesson again, how can I check this?
The informations are stored in a database. I have a table with one column for the user and one for the lesson I want to show a message box if the same data is already stored in the database.

I tried something like
Quote:
modelStudÜbersicht.setRowCount(0);


But I think that's not the right way to solve this. I think I have to SELECT all data in a new query..?

thx all in advance

What I have tried:

Quote:
I tried something like
Quote:
modelStudÜbersicht.setRowCount(0);
Posted
Comments
Richard MacCutchan 7-Jul-18 8:10am    
You first need to query the database to see if there is an entry for that user with the requested lesson. If there is no entry then you should insert or update the user entry. If the entry already exists then take whatever action is required to reject the request.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900