When I insert the data into my SQL table everything is normal.
However, when trying to insert a second time, with the same value in id
that is the main field of the table, it returns the following error:
Duplcate entry '156' for key 'PRIMARY'
.
However, I want my system to insert a new data line that has the same ID. How do I make this primary key 'duplicate'?
SQL:
CREATE TABLE IF NOT EXISTS 'controledegm' (
'char_id' int(11) unsigned NOT NULL AUTO_INCREMENT,
'char_name' varchar(255) NOT NULL,
'item_id' int(11) NOT NULL,
'item_name' varchar(255) NOT NULL,
'item_quantidade' int(11) NOT NULL,
'data' varchar(20) DEFAULT NULL,
'hora' varchar(20) NOT NULL,
PRIMARY KEY ('char_id')
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=150007 ;