Make PreparedStatements static for each database.

This commit is contained in:
hondacrx
2023-02-04 20:55:14 -05:00
parent e0e20b6b1c
commit 149fadccab
90 changed files with 922 additions and 923 deletions
+2 -2
View File
@@ -182,7 +182,7 @@ namespace Game.Chat
{
if (channel != null)
channel.SetOwnership(true);
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHANNEL_OWNERSHIP);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_CHANNEL_OWNERSHIP);
stmt.AddValue(0, 1);
stmt.AddValue(1, channelName);
DB.Characters.Execute(stmt);
@@ -192,7 +192,7 @@ namespace Game.Chat
{
if (channel != null)
channel.SetOwnership(false);
PreparedStatement stmt = DB.Characters.GetPreparedStatement(CharStatements.UPD_CHANNEL_OWNERSHIP);
PreparedStatement stmt = CharacterDatabase.GetPreparedStatement(CharStatements.UPD_CHANNEL_OWNERSHIP);
stmt.AddValue(0, 0);
stmt.AddValue(1, channelName);
DB.Characters.Execute(stmt);