I have a myIsam table people
as follow:
[id][name][cat]
with values: 12,"John Doe", "worker"
id
is unique and name
is fulltext.
I put some values inside by a remote file call. Then I change manually cat
value to another different value:
[id][name][cat]
with values: 12,"John Doe", "player"
When I update values from a remote file again to insert into table, I don't want the column 'cat' get old remote values from file in case row have same id. I just want to keep the manually entered value. But still retrieving the old value!
I am trying with this code and it's doesn't work.
INSERT INTO people (id,name,cat) VALUES (12,'John Doe','worker') ON DUPLICATE KEY UPDATE name = '$name',cat = VALUES(cat);