Hi Mark,
I guess the best way would be to use some php and sql and let the
application do the checking. First run a query to acertain if the key is
present, if yes then update the main record else insert a new record.
bascially you just need to bring the SQL logic into the app logic.
Bastien
It seems to me that the _mysql manual_ gives a most straightforward and useful
explanation:
If you specify the ON DUPLICATE KEY UPDATE clause (new in MySQL 4.1.0), and a
row is inserted that would cause a duplicate value in a UNIQUE index or PRIMARY KEY,
an UPDATE of the old row is performed.