Difference between revisions of "6CC001 Workshop - week 04"

From mi-linux
Jump to navigationJump to search
Line 1: Line 1:
 
[[Main Page]] >> [[CP3207|Web Application Development]] >> [[Web Application Developpment - Workbook|Workbook]] >> Week 04
 
[[Main Page]] >> [[CP3207|Web Application Development]] >> [[Web Application Developpment - Workbook|Workbook]] >> Week 04
 +
 +
<pre>
 +
CREATE TABLE IF NOT EXISTS `messages` (
 +
  `id` int(11) NOT NULL auto_increment,
 +
  `title` varchar(255) NOT NULL,
 +
  `message` text NOT NULL,
 +
  `date_added` datetime NOT NULL,
 +
  PRIMARY KEY  (`id`)
 +
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
 +
 +
INSERT INTO `messages` (`id`, `title`, `message`, `date_added`) VALUES
 +
(17, 'Test 1', 'Hello world!', '2009-07-27 15:06:29'),
 +
(18, 'Test 2', 'Hiya', '2009-07-27 15:06:38');
 +
</pre>

Revision as of 15:07, 27 July 2009

Main Page >> Web Application Development >> Workbook >> Week 04

CREATE TABLE IF NOT EXISTS `messages` (
  `id` int(11) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;

INSERT INTO `messages` (`id`, `title`, `message`, `date_added`) VALUES
(17, 'Test 1', 'Hello world!', '2009-07-27 15:06:29'),
(18, 'Test 2', 'Hiya', '2009-07-27 15:06:38');