php - Codeigniter on duplicate key update with auto increment in MySQL -
how insert on duplicate key update in mysql primary key auto increment number ? unique key cannot specified new record..
odku works not primary keys, works on unique keys. u should define 1 unique key catch duplicates.
alter table `table` add unique ( `field1` /* ... ,`fieldn` */ );
Comments
Post a Comment