•  
     

MySQL SteamID to CommunityID - Conversion to 64 bit int

Código: Selecionar todos

SELECT id,(CASE WHEN steam_id LIKE 'STEAM_%' THEN 76561197960265728 + CAST(SUBSTRING(steam_id,9,1) AS UNSIGNED) + CAST(SUBSTRING(steam_id,11) * 2 AS UNSIGNED)WHEN steam_id LIKE '[U:%]' THEN 76561197960265728 + CAST(SUBSTRING(steam_id,6,CHAR_LENGTH(steam_id) - 6) AS UNSIGNED)END) AS community_id