Monday, 17th Jun

a455cdN379FXE55P50500524
4241e2VP-CIAA3194228
4241e2VP-CIAA3194228
4d20389H-MCEA3192592
aa79f6N774XFA3192019
346156EC-NBDA3191901
4d20239H-AEMA3192382
a6104cN490CBCL3020147
86d607JA824PA3208835
710432HZ-FAKA3208673
e08594LV-HVTA3208574
7c0d46VH-CWOBE20BL-72
86d629JA825PA3208847
7585b3RP-C8948A3205547
7cf9f4A54-029PC21
a9c2adN728QLC750750-0295
02a1b4TS-INUA3203827
adf61aN999WVC208208B2082

Sunday, 16th Jun

0101deSU-GEUB78938802
76bd4a9V-OJJB78937131
a1f4b3N225MMAC9011462
c05219C-GFCIA3203286
a4bb8aN404ANA21N8758
4d21ea9H-QABB73844792
8a07a5PK-SNMC208

Saturday, 15th Jun

ace60cN930DZB73963539
a420afN365UPB76365788
c0753bC-GSKGB190UC-22
4d012dLX-KCLB74435236
78175aB-606RGLF5
a10c3eN167FTC68A680A0204
a2cf34N280NNE75L17000800
a7dbaaN605UXE75L17000802
49d3acOK-ASTC56X560-5068
4bb325TC-LYEB39M60066
c059c9C-GIAAAC9011505
a46e40N385DZA3218975
3d5005D-FCOBP46T
ab73f5N837SKCRJ915466

MySQL conditional updates

INSERT INTO daily_events
  (created_on, last_event_id, last_event_created_at)
VALUES
  ('2010-01-19', 23, '2010-01-19 10:23:11')
ON DUPLICATE KEY UPDATE
  last_event_id = IF(last_event_created_at < VALUES(last_event_created_at), VALUES(last_event_id), last_event_id),
  last_event_created_at = IF(last_event_created_at < VALUES(last_event_created_at), VALUES(last_event_created_at), last_event_created_at);

Source: https://thewebfellas.com/blog/conditional-duplicate-key-updates-with-mysql/

Back to Top