mysql question
#1

OK I am working on mysql vehicle ownership system. And I want to add keys for players. Like I am the owner of the vehicle and I want to give you a key from my car and I can give as much keys as I want. Now I only have columns for position, owner, price and model. I want to ask is it possible to dynamicly add columns for keys for a car or is there another function to do this
Reply
#2

You need an association table (supposedly called "CarKey") between player and car.



Underlined attributes are primary keys. FK is foreign key.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
You need an association table (supposedly called "CarKey") between player and car.



Underlined attributes are primary keys. FK is foreign key.
This is what I understood from your comment:

Make another table keys add 2 columns. 1 for player and 1 for car id. And then just load it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)