Hello everyone. First of all, I would like to briefly mention my project. I have created a system where profile visitors are recorded, but it keeps duplicating the same entry every time. For example, in the table, we have columns for ID, visitor ID, visitor, and visit date, with entries like:
1 - 30 - 2 - visit time 2
2 - 30 - 2 - visit time 3
3 - 30 - 2 - visit time 4
I do not want it to be like this. For instance, when user with ID 30 visits user with ID 2, it should check if a similar record exists before. If it does, it should only update the visit time. If not, it should create a new entry. How can I achieve this? Can you help me with this?
1 - 30 - 2 - visit time 2
2 - 30 - 2 - visit time 3
3 - 30 - 2 - visit time 4
I do not want it to be like this. For instance, when user with ID 30 visits user with ID 2, it should check if a similar record exists before. If it does, it should only update the visit time. If not, it should create a new entry. How can I achieve this? Can you help me with this?