I am getting the error
ERROR 1064: You have an error in your SQL syntax near 'ON DUPLICATE KEY UPDATE d_email='mynewemail@myemail.com' at line 1
when I run the query
insert into tablename (d_catid,d_focus,d_email) VALUES (2,1,'myname@myemail.com') ON DUPLICATE KEY UPDATE d_email='mynewemail@myemail.com'
The table is described as
mysql> desc tablename;
+---------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+--------------+------+-----+---------+-------+
| d_catid | int(11) | YES | | NULL | |
| d_focus | int(11) | | PRI | 0 | |
| d_email | varchar(200) | YES | | NULL | |
+---------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)
Please help.