I'm setting up a database that includes tracking of trades of baseball
teams. For the teams table I have:
CREATE TABLE teams (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
city VARCHAR(13),
name VARCHAR(12),
abbreviation VARCHAR(3)
);
I get lost when creating the trades table how do I set it up so
there's two foreign keys to the teams table? I'm trying to achieve
something along the lines of this:
CREATE TABLE trades (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
team2_id INT UNSIGNED NOT NULL,
team1_id INT UNSIGNED NOT NULL
);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---