UseBB Community

UseBB support, discussion and development

Mysql help!

Post Reply

Page: 1

Author Post
Member
Registered: Jul 2005
Posts: 187
Location: Stockholm
Well i was fooling around with a script and were trying to do the mysql table for the script as i coulden't find anyone well i wrote this:

 CREATE TABLE `site_hs_game` (
`id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`game_id` VARCHAR( 6 ) NOT NULL ,
`name` VARCHAR( 255 ) NOT NULL ,
`author` VARCHAR( 64 ) NOT NULL ,
`homepage` VARCHAR( 255 ) NOT NULL ,
`password` VARCHAR( 6 ) NOT NULL ,
`css_file` VARCHAR( 64 ) DEFAULT 'std_hs.css' NOT NULL ,
`stamp` TIMESTAMP( 14 ) NOT NULL
)


and i get ther error
Incorrect table definition; There can only be one auto column and it must be defined as a key 


what have is wrong ?
Member
Registered: Mar 2005
Posts: 184
Location: Hungary
The AUTO_INCREMENT field has a bad type, gonna look aroung for you.
_______________
Long Live Rock n' Roll!
Member
Registered: Jul 2005
Posts: 187
Location: Stockholm
oh i solved it just added
PRIMARY KEY ( `id` )

Post Reply

Page: 1

UseBB Community is powered by UseBB 1 Forum Software