Hi guys, i'm following a tutorial on php/mysql and i'm attempting to input this sql code into a db in phpmyadmin
Code:
CREATE TABLE `databasename`.`cmsarticles` (
`ID` int(6) unsigned NOT NULL auto_increment COMMENT 'The unique ID of the article',
`title` varchar(200) NULL COMMENT 'The article title',
`tagline` varchar(255) NULL COMMENT 'Short summary of the article',
`section` int(4) NULL DEFAULT 0 COMMENT 'The section of the article',
`thearticle` text NULL COMMENT 'The article itself',
PRIMARY KEY (`ID`)
);
The writer of the tutorial said a simple copy and paste just see the MYSQL db setup, but i have attempted to alter the code and remove some of the " ' " from the code and i keep getting erorr's. The error i get when i attemp to run that code is
You have an error in your SQL syntax near 'COMMENT 'The unique ID of the article', `title` varchar(200) NULL COMMENT 'The a
Not sure if this is the problem, but how about trying:
Code:
...
`ID` int(6) unsigned NOT NULL auto_increment PRIMARY KEY COMMENT 'The unique ID of the article',
...
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
The last comma (just before the closing parenthese) needs to be deleted.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks