25.11.2015, 15:21
So vince after reading it again and came to conclusion of how to use foreign keys and parental/child structuring. I have a small concern which i didn't actually get correctly in my brain. I can't actually understand how to get something from a field(Sorry if i speak bad English and you can't understand). Example:
I am making a House System and as you had told me in a post at scripting section
How could i set a player owner of a house or how to get if a player is owner of the house using id from player table?
What i did and i don't really think could work well is changing Username on my account table to Unique and then i setted a relation view through HOwner(variable for house owner name from houses table) with Username from account table. How could it work? In other words? How i could get the owner of the house(ID or name) using foreign key ?
I am making a House System and as you had told me in a post at scripting section
Quote:
House Owner should be linked to the player's unique id in the player table. A player's name is only to appear once in the entire database. Any other tables that require the player's information must link to the original table via a foreign key. |
What i did and i don't really think could work well is changing Username on my account table to Unique and then i setted a relation view through HOwner(variable for house owner name from houses table) with Username from account table. How could it work? In other words? How i could get the owner of the house(ID or name) using foreign key ?