sql server - How to make MSSQL query in PHP case-sensitive? -


in script on our web server, display users online in-game looking @ mssql database specific values displaying members based on such data.

lets user login 'blargh' has 3 characters: master, master, , blargh
lets has logged in 'master'

the below script value of '1' in 'connectstat' field grab username along other pertinent data, display it.

the problem lies when has 2 similar in-game names on single account.

with above example, script show master, , master both online, though 1 in-game. believe case sensitivity issue when identifies 'master' online, it's ignoring case , believes 'master' online well.

anyone have ideas on how isolate making case-sensitive?

$query = 'select gameidc, resets, class, mapnumber, mapposx, mapposy, servername, onlinehours, clevel memb_stat, accountcharacter, character memb_stat.connectstat=1 , accountcharacter.id=memb_stat.memb___id , accountcharacter.gameidc=character.name collate chinese_prc_ci_as order gameidc, servername desc';

$result = mssql_query($query);

this on xampp-based web server on winxp x86 using php5 , mssql (odbc)

case sensitivity comes collation. if collation set cs (case sensitive) query condition cs well.
however, why dont try use group by
ie. select playername gamedb status=1 group playername;


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -