The Mudcat Café TM
Thread #72655 Message #1253588
Posted By: GUEST,Jon
22-Aug-04 - 02:05 PM
Thread Name: Tech: two Mudcatters with same name
Subject: RE: Tech: two Mudcatters with same name
Well yes Barbra, someone on the tech side probably could but I doubt it would be done leaving the old name the same.
On a typical system, the actual key is likely to be a member number not a name (eg I think Im something like 4469 here) and the member name field may well allow duplicates - it does at both folkinfo and at the Annexe. What I do is every time a new person tries to join or updates their details I run some simple SQL. For a new member it goes:
"SELECT m_name FROM member WHERE m_name = 'newname'"
If this query returns a row, it means the username has already been taken and this is reported and the person is given the chance to try another name.
The difficulty I mentioned earlier is one with standard rules of relational databases. With my forums, one of those rules could be expressed that for every post (and every post contains the memberID of the poster) there MUST be a corresponding entry in the member table.
I could not simply delete my memberID (1) at folkinfo for example as I have posted there as to do so would break the rule. If it was allowed, there would then be a lot of posts made by an unknown poster. Delete a few more members on a system like that and you have chaos and confusion on your hands!