Advertisement
Guest User

Untitled

a guest
Apr 18th, 2012
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS `comments` (
  2.   `id` int(11) NOT NULL AUTO_INCREMENT,
  3.   `comment` text NOT NULL,
  4.   `club_id` int(9) NOT NULL,
  5.   `comment_date` date NOT NULL,
  6.   PRIMARY KEY (`id`),
  7.   UNIQUE KEY `club_id` (`club_id`)
  8. ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;
  9.  
  10. --
  11. -- Constraints for dumped tables
  12. --
  13.  
  14. --
  15. -- Constraints for table `comments`
  16. --
  17. ALTER TABLE `comments`
  18.   ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`club_id`) REFERENCES `clubs` (`id`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement