diff options
author | KittoFlora | 2009-11-19 20:20:03 +0100 |
---|---|---|
committer | KittoFlora | 2009-11-19 20:20:03 +0100 |
commit | 251d1b8fbbc311ea267d0a44d5878df480d69338 (patch) | |
tree | 4ef142946d9b05d42564ddba63a99a67db5659bc /OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |
parent | Clean up messages in ODE (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.zip opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.gz opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.bz2 opensim-SC-251d1b8fbbc311ea267d0a44d5878df480d69338.tar.xz |
Merge branch 'careminster' into tests
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLGenericTableHandler.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 4eb4a24..4e27e26 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Data.MySQL | |||
112 | for (int i = 0 ; i < fields.Length ; i++) | 112 | for (int i = 0 ; i < fields.Length ; i++) |
113 | { | 113 | { |
114 | cmd.Parameters.AddWithValue(fields[i], keys[i]); | 114 | cmd.Parameters.AddWithValue(fields[i], keys[i]); |
115 | terms.Add(fields[i] + " = ?" + fields[i]); | 115 | terms.Add("`" + fields[i] + "` = ?" + fields[i]); |
116 | } | 116 | } |
117 | 117 | ||
118 | string where = String.Join(" and ", terms.ToArray()); | 118 | string where = String.Join(" and ", terms.ToArray()); |
@@ -190,11 +190,26 @@ namespace OpenSim.Data.MySQL | |||
190 | return DoQuery(cmd); | 190 | return DoQuery(cmd); |
191 | } | 191 | } |
192 | 192 | ||
193 | public void Store(T row) | 193 | public bool Store(T row) |
194 | { | 194 | { |
195 | MySqlCommand cmd = new MySqlCommand(); | 195 | MySqlCommand cmd = new MySqlCommand(); |
196 | 196 | ||
197 | string query = ""; | 197 | string query = ""; |
198 | |||
199 | return false; | ||
200 | } | ||
201 | |||
202 | public bool Delete(string field, string val) | ||
203 | { | ||
204 | MySqlCommand cmd = new MySqlCommand(); | ||
205 | |||
206 | cmd.CommandText = String.Format("delete from {0} where `{1}` = ?{1}", m_Realm, field); | ||
207 | cmd.Parameters.AddWithValue(field, val); | ||
208 | |||
209 | if (ExecuteNonQuery(cmd) > 0) | ||
210 | return true; | ||
211 | |||
212 | return false; | ||
198 | } | 213 | } |
199 | } | 214 | } |
200 | } | 215 | } |