$fl = rand(); INSERT INTO `data` (`id`, `date`, `fl_name`) VALUES (202, NOW(), '{$fl}') ON DUPLICATE KEY UPDATE `fl_name` = VALUES(``);