libraries/ManiaLib/Database/Tools.php
static function getOnDuplicateKeyUpdateValuesString(array $valueNames)
    {
        $strings = array();
        foreach ($valueNames as $valueName) {
            $strings[] = $valueName . '=VALUES(' . $valueName . ')';
        }
        return implode(', ', $strings);
    }
static function getOnDuplicateKeyUpdateValuesString(array $valueNames)
    {
        $strings = array();
        foreach ($valueNames as $valueName) {
            $strings[] = $valueName . '=VALUES(' . $valueName . ')';
        }
        return implode(', ', $strings);
    }
Returns string like "name1=VALUES(name1), name2=VALUES(name2)"