SQL query:
INSERT INTO `csite_popularity` ( `id` , `couponid` , `companyid` , `region` , `prints` , `day` )
VALUES ( 1, 3, 5, 4000, 1, 11166702400 )
MySQL said: Documentation
#1062 - Duplicate entry '3-4000-11166702400' for key 1
Then when i add the code according to the manual
SQL query:
INSERT INTO `csite_popularity` ( `id` , `couponid` , `companyid` , `region` , `prints` , `day` )
VALUES (
NULL , 4, 1, 4000, 1, 11166702400
), (
NULL , 3, 5, 4000, 1, 11166702400
) ON DUPLICATE
KEY UPDATE prints = prints +1
MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON DUPLICATE KEY UPDATE prints=prints+1' at line 3
Im confused