fearless Posted September 13, 2007 Report Posted September 13, 2007 CREATE TABLE `users` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `username` VARCHAR( 30 ) NOT NULL , `password` CHAR( 40 ) NOT NULL , `email` VARCHAR( 70 ) NOT NULL , `active` CHAR( 32 ) NOT NULL ) ENGINE = innodb MySQL said: Documentation #1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
Grey_Wolf Posted September 13, 2007 Report Posted September 13, 2007 fearless --> lai izmantotu AutoIncramet lauks ir jadifine kaa atslega ... tev tachu skaidri un gaishi uzrakstiits (izlasi ko SQLs tev saka) truukst PRIMARY KEY ( `id` ) CREATE TABLE `test` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `kautkas` VARCHAR( 250 ) NOT NULL , `kautkas2` DATE NOT NULL , `kautkas3` TEXT NOT NULL , PRIMARY KEY ( `id` ) ) TYPE = innodb;
fearless Posted September 13, 2007 Author Report Posted September 13, 2007 kur un ka to PRIMARY KEY ( `id` ) pieveinot?
andrisp Posted September 13, 2007 Report Posted September 13, 2007 fearless, paskaties vēlreiz Grey_Wolf piedāvāto kodu. Tur ir parādīts.
fearless Posted September 13, 2007 Author Report Posted September 13, 2007 Saprotu visu lidz `kautkas3` TEXT NOT NULL ,
andrisp Posted September 13, 2007 Report Posted September 13, 2007 Nu moins :) Tev jāievieto tas PRIMARY KEY ( `id` ) tur kur Grey_Wolf ir norādījis. CREATE TABLE `users` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `username` VARCHAR( 30 ) NOT NULL , `password` CHAR( 40 ) NOT NULL , `email` VARCHAR( 70 ) NOT NULL , `active` CHAR( 32 ) NOT NULL, PRIMARY KEY ( `id` ) ) ENGINE = innodb
4e4en Posted September 13, 2007 Report Posted September 13, 2007 sitādus nemaz nedrīkstētu laist pie kodēšanas <_<
fearless Posted September 13, 2007 Author Report Posted September 13, 2007 oj sory parlasiju velreiz vis ir :D
Recommended Posts