Not allowing duplicate records
Posted: Wed Aug 16, 2006 7:28 am
I have a database that has the following userid, frienduserid, friendusername in it.
What happens is that a user (userid) can add anotehr user as their friend.
So this means any user can add any other user to their friends list.
When a user clicks on the "add friend" link on my site the details are updated with the "new friend partnership". What I am havign problems with is that a user can add the samne friend as many times as they want, so what I need is that if a user alreday has a friendship then if they try to add another then it doesn't get added.
Can anyone help please?
Cheers
Wardy
What happens is that a user (userid) can add anotehr user as their friend.
So this means any user can add any other user to their friends list.
When a user clicks on the "add friend" link on my site the details are updated with the "new friend partnership". What I am havign problems with is that a user can add the samne friend as many times as they want, so what I need is that if a user alreday has a friendship then if they try to add another then it doesn't get added.
Can anyone help please?
Cheers
Wardy