diff options
author | CasperW | 2009-12-27 07:11:21 +0100 |
---|---|---|
committer | CasperW | 2009-12-27 07:11:21 +0100 |
commit | 4b96a780399439b1bb05b92b016bed1bc614b1f6 (patch) | |
tree | 5fd4c5939161e4d5b32e55ae9988730dc86ff20e /OpenSim/Data | |
parent | Convert some remaining legacy lock()s for m_parts in SceneObjectGroup to Read... (diff) | |
parent | Correct some issues with the last commit (diff) | |
download | opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.zip opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.gz opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.bz2 opensim-SC_OLD-4b96a780399439b1bb05b92b016bed1bc614b1f6.tar.xz |
Merge branch 'master' into casper
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 4dfc324..b2bd5f6 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -205,7 +205,8 @@ namespace OpenSim.Data.MySQL | |||
205 | foreach (FieldInfo fi in m_Fields.Values) | 205 | foreach (FieldInfo fi in m_Fields.Values) |
206 | { | 206 | { |
207 | names.Add(fi.Name); | 207 | names.Add(fi.Name); |
208 | values.Add(fi.GetValue(row).ToString()); | 208 | values.Add("?" + fi.Name); |
209 | cmd.Parameters.AddWithValue(fi.Name, fi.GetValue(row).ToString()); | ||
209 | } | 210 | } |
210 | 211 | ||
211 | if (m_DataField != null) | 212 | if (m_DataField != null) |
@@ -216,11 +217,12 @@ namespace OpenSim.Data.MySQL | |||
216 | foreach (KeyValuePair<string, string> kvp in data) | 217 | foreach (KeyValuePair<string, string> kvp in data) |
217 | { | 218 | { |
218 | names.Add(kvp.Key); | 219 | names.Add(kvp.Key); |
219 | values.Add(kvp.Value); | 220 | values.Add("?" + kvp.Key); |
221 | cmd.Parameters.AddWithValue("?" + kvp.Key, kvp.Value); | ||
220 | } | 222 | } |
221 | } | 223 | } |
222 | 224 | ||
223 | query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values ('" + String.Join("','", values.ToArray()) + "')"; | 225 | query = String.Format("replace into {0} (`", m_Realm) + String.Join("`,`", names.ToArray()) + "`) values (" + String.Join(",", values.ToArray()) + ")"; |
224 | 226 | ||
225 | cmd.CommandText = query; | 227 | cmd.CommandText = query; |
226 | 228 | ||