In a script on our web server, we display users who are online in-game by looking at a MSSQL database for specific values then displaying the members based on such data.
Lets say user login 'blargh' has 3 characters: MasteR, MasTeR, and BlarGh
Lets also say that he has logged in as 'MasteR'
The below script will look for the value of '1' in 'connectstat' field then grab his username along with some other pertinent data, then display it.
The problem lies when someone has two similar in-game names on a single account.
With the above example, this script will show MasteR, and MasTeR are both online, even though only one is actually in-game. I believe this is a case sensitivity issue where when it identifies 'MasteR' as online, it's ignoring the case and believes 'MasTeR' is online as well.
Anyone have ideas on how to isolate this by making it case-sensitive?
$query = 'Select GameIDC, Resets, Class, MapNumber, MapPosX, MapPosY, ServerName, OnlineHours, clevel From MEMB_STAT, AccountCharacter, Character where MEMB_STAT.Connectstat=1 and AccountCharacter.Id=MEMB_STAT.memb___id AND AccountCharacter.GameIDC=Character.Name collate Chinese_PRC_CI_AS order by GameIDC, ServerName desc';
$result = mssql_query($query);
This is on a xampp-based web server on winxp x86 using php5 and MSSQL (ODBC)