diff options
author | UbitUmarov | 2016-11-09 22:39:52 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-09 22:39:52 +0000 |
commit | d1baa3e0c3b1783a68061980ffd8b9693c5a474a (patch) | |
tree | 774fb5ae0be5e9b597c46af3b3b5f3e0c6a3f0d6 /OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | |
parent | stop warning about integer division cast to float (diff) | |
download | opensim-SC_OLD-d1baa3e0c3b1783a68061980ffd8b9693c5a474a.zip opensim-SC_OLD-d1baa3e0c3b1783a68061980ffd8b9693c5a474a.tar.gz opensim-SC_OLD-d1baa3e0c3b1783a68061980ffd8b9693c5a474a.tar.bz2 opensim-SC_OLD-d1baa3e0c3b1783a68061980ffd8b9693c5a474a.tar.xz |
fix some invalid string.format arguments
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs index a22b882..c34a8dc 100644 --- a/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs +++ b/OpenSim/Data/PGSQL/PGSQLXInventoryData.cs | |||
@@ -174,7 +174,9 @@ namespace OpenSim.Data.PGSQL | |||
174 | { | 174 | { |
175 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | 175 | using (NpgsqlCommand cmd = new NpgsqlCommand()) |
176 | { | 176 | { |
177 | cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); | 177 | // cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1", m_Realm); |
178 | |||
179 | cmd.CommandText = String.Format(@"select * from inventoryitems where ""avatarID"" = :uuid and ""assetType"" = :type and ""flags"" = 1"); | ||
178 | 180 | ||
179 | UUID princID = UUID.Zero; | 181 | UUID princID = UUID.Zero; |
180 | UUID.TryParse(principalID, out princID); | 182 | UUID.TryParse(principalID, out princID); |
@@ -194,11 +196,18 @@ namespace OpenSim.Data.PGSQL | |||
194 | { | 196 | { |
195 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | 197 | using (NpgsqlCommand cmd = new NpgsqlCommand()) |
196 | { | 198 | { |
199 | /* | ||
197 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" | 200 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" |
198 | from inventoryitems | 201 | from inventoryitems |
199 | where ""avatarID"" = :PrincipalID | 202 | where ""avatarID"" = :PrincipalID |
200 | and ""assetID"" = :AssetID | 203 | and ""assetID"" = :AssetID |
201 | group by ""assetID"" ", m_Realm); | 204 | group by ""assetID"" ", m_Realm); |
205 | */ | ||
206 | cmd.CommandText = String.Format(@"select bit_or(""inventoryCurrentPermissions"") as ""inventoryCurrentPermissions"" | ||
207 | from inventoryitems | ||
208 | where ""avatarID"" = :PrincipalID | ||
209 | and ""assetID"" = :AssetID | ||
210 | group by ""assetID"" "); | ||
202 | 211 | ||
203 | cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); | 212 | cmd.Parameters.Add(m_database.CreateParameter("PrincipalID", principalID)); |
204 | cmd.Parameters.Add(m_database.CreateParameter("AssetID", assetID)); | 213 | cmd.Parameters.Add(m_database.CreateParameter("AssetID", assetID)); |