Fix /whowas not working on mysql backend.

This commit is contained in:
UnknownShadow200 2016-05-28 22:09:01 +10:00
parent e96296dc06
commit 065d41d7b8
2 changed files with 2 additions and 4 deletions

View File

@ -399,9 +399,7 @@
<Compile Include="Commands\World\CmdSave.cs" />
<Compile Include="Commands\World\CmdSetspawn.cs" />
<Compile Include="Commands\World\CmdTexture.cs" />
<Compile Include="Commands\World\CmdUnflood.cs">
<DependentUpon>CmdUnload.cs</DependentUpon>
</Compile>
<Compile Include="Commands\World\CmdUnflood.cs" />
<Compile Include="Commands\World\CmdUnload.cs" />
<Compile Include="Commands\World\PermissionCmd.cs" />
<Compile Include="Config\ConfigAttribute.cs" />

View File

@ -155,7 +155,7 @@ namespace MCGalaxy {
ParameterisedQuery query = ParameterisedQuery.Create();
query.AddParam("@Name", "%" + name + "%");
string syntax = Server.useMySQL ?
"SELECT * FROM Players WHERE Name LIKE @Name LIMIT 20 COLLATE utf8_general_ci" :
"SELECT * FROM Players WHERE Name LIKE @Name LIMIT 20" :
"SELECT * FROM Players WHERE Name LIKE @Name LIMIT 20 COLLATE NOCASE";
using (DataTable results = Database.fillData(query, syntax)) {