Raimiks Posted November 20, 2006 Report Posted November 20, 2006 "insert into projects (name, `desc`) values ('Vakances', '')": Duplicate entry '0' for key 1 mēģinu uztaisit rubriku, bet vinš man lūk ko raksat.
andrisp Posted November 20, 2006 Report Posted November 20, 2006 desc droši vien ir primary key vai unique vai kas tāds, tāpēc divas vienādas vērtības tajā kolumnā nevar būt.
Raimiks Posted November 20, 2006 Author Report Posted November 20, 2006 Nevajag taisīt muļķīgas QUOTEs (bubu) hmmm desc ka paskatities primary ir vai nava ??
andrisp Posted November 20, 2006 Report Posted November 20, 2006 http://dev.mysql.com/doc/refman/5.0/en/describe.html
Raimiks Posted November 20, 2006 Author Report Posted November 20, 2006 man id primary stav ?? ar desc viss oki ??
Raimiks Posted November 20, 2006 Author Report Posted November 20, 2006 Nevajag taisīt muļķīgas QUOTEs (bubu) man ID stav ka PRIMARY. Nevis DESC.
andrisp Posted November 20, 2006 Report Posted November 20, 2006 Nu tad tev iespējams nav pielikts auto_increment tam ID. http://dev.mysql.com/doc/refman/5.0/en/exa...-increment.html
Raimiks Posted November 20, 2006 Author Report Posted November 20, 2006 Nevajag taisīt muļķīgas QUOTEs (bubu) SQL-запрос: ALTER TABLE `projects` CHANGE `id` `id` INT( 12 ) NOT NULL DEFAULT '0' AUTO_INCREMENT Ответ MySQL: Документация #1067 - Invalid default value for 'id' Lūk ka viņš uz manis sarajas kad mēģināju uzlikt
andrisp Posted November 20, 2006 Report Posted November 20, 2006 (edited) AUTO_INCREMENT laukiem nav default value. PS. Necitē visu, ko es saku. Tas tikai traucē informācijas uztveršanai. Edited November 20, 2006 by andrisp
Raimiks Posted November 20, 2006 Author Report Posted November 20, 2006 ID man vel stav ka UNIQUE blin.. lai es velreiz nemtos pārtaisīt kādām bazi vienas problemas :(
Recommended Posts