aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
index 2151568..826c6fc 100644
--- a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
+++ b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs
@@ -300,9 +300,27 @@ namespace OpenSim.Data.PGSQL
300 m_Realm, where); 300 m_Realm, where);
301 cmd.Connection = conn; 301 cmd.Connection = conn;
302 cmd.CommandText = query; 302 cmd.CommandText = query;
303 //m_log.WarnFormat("[PGSQLGenericTable]: SELECT {0} WHERE {1}", m_Realm, where);
304
305 conn.Open();
306 return DoQuery(cmd);
307 }
308 }
303 309
310 public virtual T[] Get(string where, NpgsqlParameter parameter)
311 {
312 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
313 using (NpgsqlCommand cmd = new NpgsqlCommand())
314 {
315
316 string query = String.Format("SELECT * FROM {0} WHERE {1}",
317 m_Realm, where);
318 cmd.Connection = conn;
319 cmd.CommandText = query;
304 //m_log.WarnFormat("[PGSQLGenericTable]: SELECT {0} WHERE {1}", m_Realm, where); 320 //m_log.WarnFormat("[PGSQLGenericTable]: SELECT {0} WHERE {1}", m_Realm, where);
305 321
322 cmd.Parameters.Add(parameter);
323
306 conn.Open(); 324 conn.Open();
307 return DoQuery(cmd); 325 return DoQuery(cmd);
308 } 326 }