When using insert... on duplicate key update, what is the syntax to update multiple columns?
INSERT INTO table1 (col1, col2, col3, col4) VALUES (’$val1’, ‘$v
Your query seems to be correct. Here is my example of this type of query:
INSERT INTO Stat (id, month, year, views, redirects, onList, onMap, emails) VALUE ("' . $Id . '","' . $month . '","' . $year . '",0,0,"' . $data['onList'] . '","' . $data['onMap'] . '",0) ON DUPLICATE KEY UPDATE onList=onList+' . $data['onList'] . ', onMap=onMap+' . $data['onMap']