From fa78a6fd907f6d69a2d9d7b2e856fb02fbd2d8f6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 12 Jan 2018 18:07:37 +0000 Subject: [PATCH] fix some odd sql queries ap not in use --- OpenSim/Data/MySQL/MySQLUserProfilesData.cs | 2 +- OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | 2 +- OpenSim/Data/SQLite/SQLiteUserProfilesData.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index 16637c3996..2669aca4d2 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs @@ -836,7 +836,7 @@ namespace OpenSim.Data.MySQL const string queryB = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = ?Id"; - using (MySqlCommand cmd = new MySqlCommand(string.Format (queryB,"`userpicks`"), dbcon)) + using (MySqlCommand cmd = new MySqlCommand(queryB, dbcon)) { cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); diff --git a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs index 75a51e2de1..5800de9e84 100644 --- a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs +++ b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs @@ -845,7 +845,7 @@ namespace OpenSim.Data.PGSQL query = "SELECT \"profileImage\", \"profileFirstImage\" FROM \"userprofile\" WHERE \"useruuid\" = :Id"; - using (NpgsqlCommand cmd = new NpgsqlCommand(string.Format(query, "\"userpicks\""), dbcon)) + using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon)) { cmd.Parameters.Add(m_database.CreateParameter("Id", avatarId)); diff --git a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs index 13aac79049..2f22d544f5 100644 --- a/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserProfilesData.cs @@ -926,7 +926,7 @@ namespace OpenSim.Data.SQLite { using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) { - cmd.CommandText = query; + cmd.CommandText = string.Format(query, "\"classifieds\""); cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) @@ -940,7 +940,7 @@ namespace OpenSim.Data.SQLite using (SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand()) { - cmd.CommandText = query; + cmd.CommandText = string.Format(query, "\"userpicks\""); cmd.Parameters.AddWithValue(":Id", avatarId.ToString()); using (reader = cmd.ExecuteReader(CommandBehavior.SingleRow))