I created a table in mysql(5.1.55) as following:
CREATE TABLE IF NOT EXISTS xyz (
intC1 int(11) NOT NULL AUTO_INCREMENT,
intC2 int(11) NOT NULL,
intC3 int(11) NOT NULL,
PRIMARY KEY (intC1),
UNIQUE KEY abcd (intC2,intC3)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
And then I tried to insert a row (using php 5.3.6, mysql 5.1.55) as following:
insert into xyz (intC1, intC2, intC3) values (null,4, 14);
And I received the error 1062 as following:
"Duplicate entry '4-14' for key 'abcd'"
This error repeats whether there are any rows in the table or not.
Please help.