aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLRegionData.cs20
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
index a5d2266..adea2e0 100644
--- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs
@@ -115,9 +115,25 @@ namespace OpenSim.Data.PGSQL
115 } 115 }
116 116
117 //BA MOD... 117 //BA MOD...
118 public RegionData GetSpecific(string regionName, UUID ScopeID) 118 public RegionData GetSpecific(string regionName, UUID scopeID)
119 { 119 {
120 return null; 120 string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) ";
121 if (scopeID != UUID.Zero)
122 sql += " and \"ScopeID\" = :scopeID";
123
124 using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString))
125 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
126 {
127 cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName));
128 if (scopeID != UUID.Zero)
129 cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID));
130 conn.Open();
131 List<RegionData> ret = RunCommand(cmd);
132 if (ret.Count == 0)
133 return null;
134
135 return ret[0];
136 }
121 } 137 }
122 138
123 public RegionData Get(int posX, int posY, UUID scopeID) 139 public RegionData Get(int posX, int posY, UUID scopeID)