Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE USERFAVS(
- UserID int(11),
- ImageID int(11),
- PRIMARY KEY (UserID, ImageID)
- );
- ALTER TABLE USERFAVS
- ADD CONSTRAINT `fk_userID`
- FOREIGN KEY (UserID) REFERENCES users (UserID);
- ALTER TABLE USERFAVS
- ADD CONSTRAINT `fk_ImageID`
- FOREIGN KEY (ImageID) REFERENCES imagedetails (ImageID);
- FOREIGN KEY (UserID) REFERENCES users(UserID),
- FOREIGN KEY (ImageID) REFERENCES imagedetails(ImageID),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement