Fix recent changes for MySQL backend.

This commit is contained in:
UnknownShadow200 2016-09-07 00:00:55 +10:00
parent 037b4396ae
commit cb0576797d

View File

@ -47,9 +47,8 @@ namespace MCGalaxy.SQL {
public override bool TableExists(string table) {
using (DataTable results = GetRows("information_schema.tables", "*",
"WHERE table_schema = @1 AND table_name = @",
table, Server.MySQLDatabaseName)) {
const string syntax = "SELECT * FROM information_schema.tables WHERE table_name = @0 AND table_schema = @1";
using (DataTable results = Database.Fill(syntax, table, Server.MySQLDatabaseName)) {
return results.Rows.Count > 0;
}
}