Checking my database
Posted: Tue Jun 24, 2008 4:24 am
My family tree site is growing at an exponential rate. And I'm a little stuck with something.
Each relative is assigned a Unique Reference Number (URN) based on their initials and year of birth. This isn't, as it turns out, ideal but I'm so far through now I'm kind of stuck with it.
What I want to do is build a PHP page which will search my ENTIRE database for an entered URN and tell me if it's already used.
I know that MySQL will not allow me to duplicate the main URN but each row contains parents, siblings and children's URN as well and this is where mistakes could be easily made.
The columns I need to check are:
Any idea how I could do this?
Many thanks.
KD.
Each relative is assigned a Unique Reference Number (URN) based on their initials and year of birth. This isn't, as it turns out, ideal but I'm so far through now I'm kind of stuck with it.
What I want to do is build a PHP page which will search my ENTIRE database for an entered URN and tell me if it's already used.
I know that MySQL will not allow me to duplicate the main URN but each row contains parents, siblings and children's URN as well and this is where mistakes could be easily made.
The columns I need to check are:
If the program could just return a "USED" or "AVAILABLE" after checking against a URN sent to it by a form using the GET protocol this would be great.urn
motherurn
fatherurn
sibling1urn - sibling16urn (inclusive)
spouse1urn
spouse2urn
spouse1child1urn - spouse1child16urn (inclusive)
spouse2child1urn - spouse2child16urn (inclusive)
Any idea how I could do this?
Many thanks.
KD.