Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 18th, 2012  |  syntax: PHP  |  size: 0.48 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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`);