Add this in the amxbans query and make a link of the steamid with the comid, i hope you know what i mean, im not to good in explaning, player_id is the field in amxbans for the steamid but i guess you already knew that
Code:
SELECT somefield, cast(mid(player_id,9,1) as unsigned) + cast('76561197960265728' as unsigned) + cast(mid(player_id, 11,10)*2 as unsigned) AS comid, somefield FROM sometable
__________________