LastInteracion field on Item

UPDATE Item i SET lastInteraction = (SELECT MAX(c.date) FROM Comment c
WHERE c.item_id = i.id);

UPDATE Item SET lastInteraction = date WHERE lastInteraction LIKE
'0000-00-00 00:00:00';