There were a lot of people who flipped out about
the recent steamid change in tf2.
A lot of them have mixed steamids in their database or used scripts to convert them on purpose before the issue was handled in the snapshots.
A few specific tools for specific problems were released (mostly to convert to the new steamid), but i think this is more flexible, at least for mysql specific stuff.
I've written 2 mysql functions to convert from the old to the new format and vise versa. I'm not terrible experienced in writing mysql functions, so please be kind to me.
Before you begin, i take
no responsibility for any damage done to your data.
Log into your phpmyadmin account or use your favorite mysql client and execute/import the attached file.
Lets say you have a table named
sometable that looks like this:
To convert the new steamids to old ones you can use this query
PHP Code:
UPDATE sometable AS t
SET t.somesteamid = SteamID3ToSteamID(t.somesteamid)
WHERE
t.somesteamid LIKE '[U:1:%'
This converts all new steamids (ones that begin with '[U:1:') to the old format.
To convert old id's to the new format (which you probably shouldn't do) you would use this query:
PHP Code:
UPDATE sometable AS t
SET t.somesteamid = SteamIDToSteamID3(t.somesteamid)
WHERE
t.somesteamid LIKE 'STEAM_%'
That's about it.
Remember to replace
sometable with your table name and
somesteamid with the field that contains steamids.
For sourcebans that would, by default, be the
sb_bans table and the
authid field.