diff options
author | Melanie | 2009-12-27 01:28:15 +0000 |
---|---|---|
committer | Melanie | 2009-12-27 01:28:15 +0000 |
commit | ca3aa283baf2931e72449371db420edce0885466 (patch) | |
tree | 441daa2c86c9ecfeafb9f26de496dc081f1e7bb1 /OpenSim/Data | |
parent | Presence Step 1 (diff) | |
parent | Correct some issues with the last commit (diff) | |
download | opensim-SC-ca3aa283baf2931e72449371db420edce0885466.zip opensim-SC-ca3aa283baf2931e72449371db420edce0885466.tar.gz opensim-SC-ca3aa283baf2931e72449371db420edce0885466.tar.bz2 opensim-SC-ca3aa283baf2931e72449371db420edce0885466.tar.xz |
Merge branch 'master' into presence-refactor
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 | ||