Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  Duplicate entry error

phpMyEdit General     Duplicate entry error
Odoslať novú tému   Odpovedať na tému    
 
guardian46     Založený: 31.05.2005   Príspevky: 34  
Príspevok Zaslal: 2005-07-12 22:52
Návrat hore  Odpovedať s citátom     

I have a table with 17 columns. The Primary key is the first column (tagno). Whenever I Add or Change a record, if more then one column is changed I get this error for every column changed:

MySQL error 1062
Duplicate entry '2005-07-12 16:39:46' for key 1

Can anyone tell me if this is mysql table schema problem, or pme? (All the data and changes are being saved, so this is just annoying, not critical).

I am using ver 1.167 of the class file along with the mce-cal extension. Here is my table:

CREATE TABLE `assets` (
`tagno` int(11) NOT NULL default '0',
`invdate` date NOT NULL default '0000-00-00',
`type` varchar(30) NOT NULL default '',
`maker` varchar(60) NOT NULL default '',
`model` varchar(60) NOT NULL default '',
`serial` varchar(40) NOT NULL default '',
`cpu` varchar(20) NOT NULL default '',
`ram` varchar(15) NOT NULL default '',
`hdd` varchar(15) NOT NULL default '',
`osver` varchar(15) NOT NULL default '',
`cd` varchar(5) NOT NULL default '',
`dept` varchar(20) NOT NULL default '',
`location` varchar(5) NOT NULL default '',
`name` varchar(30) NOT NULL default '',
`service` varchar(30) NOT NULL default '',
`date` date NOT NULL default '0000-00-00',
`notes` text NOT NULL,
PRIMARY KEY (`tagno`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Thanks!!
PME is great, I keep finding more great uses for it!!

 
guardian46     Založený: 31.05.2005   Príspevky: 34  
Príspevok Zaslal: 2005-07-18 05:27
Návrat hore  Odpovedať s citátom     

Thanks Doug,

I was thinking that might be it. The problem in this case is the values in the tagno field are pre-defined and start with 100 go thru 1899. If I add auto_increment to the mysql column what happens? How will it handle not have 1 thru 99? Will it pickup and start numbering correctly at 1900?

Appreciate the help!

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov