Fix ban system conversion issue with MySQL

DeathCradle spotted a typo in the ban converter and identified that the
issue is likely because we used table_name in some, but not all, of the
conversion SQL.

Co-authored-by: DeathCradle <rt.luke.s@gmail.com>
This commit is contained in:
Lucas Nicodemus 2021-04-10 23:59:47 -07:00
parent b862baa220
commit 78eab01904
3 changed files with 6 additions and 3 deletions

View file

@ -107,7 +107,7 @@ namespace TShockAPI.DB
int res;
if (database.GetSqlType() == SqlType.Mysql)
{
res = database.QueryScalar<int>("SELECT COUNT(name) FROM information_schema.tables WHERE table_schema = @0 and table_name = 'Bans'", TShock.Config.Settings.MySqlDbName);
res = database.QueryScalar<int>("SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema = @0 and table_name = 'Bans'", TShock.Config.Settings.MySqlDbName);
}
else
{