If you store by their steam id and not their name, you could be guaranteed that this wouldn't happen, unless they set their password to have one of the same characters (which may cause this same odd problem for you), but you can check for that when they try to set a password.
PHP Code:
static SteamID[37]
get_user_authid(id,SteamID[id],36)
Edit: I'm using mySQL and I ran a query searching for ";" in a string field, and it returned a value just fine. Perhaps either you are doing something wrong with the user's name before you make this call, or you are using a version of SQL that doesn't like semicolons. Either way, I still suggest using their steam id if it will work fine for whatever your goal is.
Output exactly what you're passing into the query using a print_chat or print_console before you run the query, and post exactly what's making it in there.
__________________