Add UPDATE into exsisting INSERT script

I have made a small change to the script and json file.

It seems to work :slight_smile:

I changed one value in the json file which updated ok using the below code, though still unsure if any other rows have been effected.

$st = $mysqli->prepare("
  INSERT INTO events_test(
  DTEND
  , UID
  , DTSTAMP
  , LOCATION
  , DESCRIPTION
  , DTSTART
  , SUMMARY)
  
  VALUES (?, ?, ?, ?, ?, ?, ?)
  
  ON DUPLICATE KEY UPDATE

  DTEND = VALUES (DTEND)
  , DTSTAMP = VALUES (DTSTAMP)
  , LOCATION = VALUES (LOCATION)
  , DESCRIPTION = VALUES (DESCRIPTION)
  , DTSTART = VALUES (DTSTART)
  , SUMMARY = VALUES (SUMMARY)

");

And wondering if this is the correct way to use ON DUPLICATE KEY UPDATE?

I’ll need to do further testing tomorrow and check if all the rows have been updated some how.

Thanks, Barry