Sublime directory Surf the web anonymous Pagerank Monitor


mysql error upon entry of normal query

Meth0d
Mon 23 January 2006, 04:53 pm GMT +0200
i receive a mysql error when trying to run this simple, everyday, normal query:

Code:
CREATE TABLE `news` (
`id` int(10) NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`author` varchar(30) NOT NULL default '',
`content` text NOT NULL,
`postdate` varchar(25) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM

CREATE TABLE `news_comments` (
`id` int(10) NOT NULL auto_increment,
`author` varchar(30) NOT NULL default '',
`content` text NOT NULL,
`postdate` varchar(125) NOT NULL default '',
`nid` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM

this is the error that i receive

Quote
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE `news_comments` (
`id` int(10) NOT NULL auto_inc

Meth0d
Mon 23 January 2006, 05:50 pm GMT +0200
nevermind, discovered the problem. this query came from a newer (or older, not sure) of mysql. here is the solution:

change

Code:
TYPE=MyISAM

to

Code:
TYPE=MyISAM AUTO_INCREMENT=1 

Archive for SMF v1.00 by N.P. Valid XHTML 1.0 Transitional