Jump to content

stalian4002

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Posts posted by stalian4002

  1. hi can anyone please help me, i am a beginner at php and mysql. i  am trying to make a family tree website similar to GEDCOM. i am having some problem what i am trying to do is make a button called spouse on the page once clicked on it will save it to the corresponding user and vice versa

     

    id | firsname| lastname| spouse| MotherID| FatherID|

    ----------------------------------------------------------------------------------------

    1| steve      | go          | 2 |      Null |        Null |

    2| Julia          | steve    | 1 |      Null |        Null |

    3| robert      | go        | Null |      2 |              1

     

     

    i have my tables

    http://img217.imageshack.us/img217/1729/tablessr7.jpg

     

    this is what i am trying to achieve something similar to this

     

    http://img217.imageshack.us/img217/8363/genesreunitedb3.jpg

     

    PLEASE HELPPP!!!

  2. hi can anyone please help me, i am a beginner at php and mysql. i  am trying to make a family tree website similar to GEDCOM. i am having some problem what i am trying to do is make a button called spouse on the page once clicked on it will save it to the corresponding user.

     

    id | firsname| lastname| spouse| MotherID| FatherID|

    ----------------------------------------------------------------------------------------

    1| steve      | go          | 2 |      Null |        Null |

    2| Julia          | steve    | 1 |      Null |        Null |

    3| robert      | go        | Null |      2 |              1

     

     

    i have my tables

    http://img217.imageshack.us/img217/1729/tablessr7.jpg

     

    this is what i am trying to achieve something similar to this

     

    http://img217.imageshack.us/img217/8363/genesreunitedb3.jpg

     

    PLEASE HELPPP!!!

     

  3. hi i am trying to make a family tree website using php mysql, i have the following tables im not sure if its correct or if i am going the right way about it, can someone help me out please. i am using phpmyadmin

     

    i have 5 tables:

     

    USERS:

     

    user_id (PK)

    username

    password

    firstname

    lastname

    email

     

    FAMILY_TREE:

     

    user_id(FK)

    family tree name

    description

    family tree ID(PK)

     

    FAMILY_MEMBERS:

     

    family memberID(PK)

    firstname

    lastname

    date of birth

    date of death

    place of birth

    place of death

    gender

    family treeID(FK)

    motherID(FK)

    fatherID(FK)

     

    MOTHERS:

     

    motherID(PK)

    mother of family(FK)

    mothers userID(FK)

     

    FATHERS:

     

    fatherID(PK)

    father of family(FK)

    fathers userID(FK)

     

    user table: has web users details and stores password

     

    family tree table: holds family tree id making it unique

     

    family member: will hold all members of the family

     

    mothers: will hold into who is whos mother

     

    father: will hold into who is whos father

     

    i just wanted to know if my table structure is correct and if im going the right way about it.

     

    can someone also help me with sql join query

     

    [attachment deleted by admin]

  4. I am writing a program to store family tree data, similar to the

    GEDCOM format.  I need help writing a sql query to get all the relatives and

    determine the relation (father's mother, brother's wife, etc)  for a

    particular user.  Here is my basic table structure:

     

    Table Users

    -UserName (PK)

    -FirstName

    -AsChildInFamilyID

    -AsSpouseInFamilyID

    -AsParentInFamilyID

     

    Table Families

    - FamilyID (PK)

    - MarriageDate

     

    Table FamilyMembers

    - FamilyMemberID (PK)

    - FamilyID (FK)

    - UserName

    - Relation (0 - Husband, 1 - Wife, 3-Child)

     

    ---> So, given any user, I need to find all the relatives (traverse up as

    well as down the tree) and also calculate the relationships as I go along.

    The relation column stores the relation specific only to the family (that too

    not very accurate, because for instance the husband is actually the father to

    the child, not the husband), but I need to "update" the Relation field to

    include the depth of the traversal.

     

    Based on my table structure, a family unit is husband, wife and

    children....I somehow have to recursively find all the ascendants,

    descendants, etc...

     

    Any help on how I can do this would be great. I am using mysql

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.