fearless Posted September 13, 2007 Report Share 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 Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 13, 2007 Report Share 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; Link to comment Share on other sites More sharing options...
fearless Posted September 13, 2007 Author Report Share Posted September 13, 2007 kur un ka to PRIMARY KEY ( `id` ) pieveinot? Link to comment Share on other sites More sharing options...
andrisp Posted September 13, 2007 Report Share Posted September 13, 2007 fearless, paskaties vēlreiz Grey_Wolf piedāvāto kodu. Tur ir parādīts. Link to comment Share on other sites More sharing options...
fearless Posted September 13, 2007 Author Report Share Posted September 13, 2007 Saprotu visu lidz `kautkas3` TEXT NOT NULL , Link to comment Share on other sites More sharing options...
andrisp Posted September 13, 2007 Report Share 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 Link to comment Share on other sites More sharing options...
4e4en Posted September 13, 2007 Report Share Posted September 13, 2007 sitādus nemaz nedrīkstētu laist pie kodēšanas <_< Link to comment Share on other sites More sharing options...
fearless Posted September 13, 2007 Author Report Share Posted September 13, 2007 oj sory parlasiju velreiz vis ir :D Link to comment Share on other sites More sharing options...
Recommended Posts