diff options
Diffstat (limited to 'OpenSim/Data/SQLiteLegacy')
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs index ad28c00..4dd225f 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteEstateData.cs | |||
@@ -401,7 +401,29 @@ namespace OpenSim.Data.SQLiteLegacy | |||
401 | 401 | ||
402 | return result; | 402 | return result; |
403 | } | 403 | } |
404 | 404 | ||
405 | public List<int> GetEstatesByOwner(UUID ownerID) | ||
406 | { | ||
407 | List<int> result = new List<int>(); | ||
408 | |||
409 | string sql = "select EstateID from estate_settings where estate_settings.EstateOwner = :EstateOwner"; | ||
410 | |||
411 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | ||
412 | |||
413 | cmd.CommandText = sql; | ||
414 | cmd.Parameters.Add(":EstateOwner", ownerID); | ||
415 | |||
416 | IDataReader r = cmd.ExecuteReader(); | ||
417 | |||
418 | while (r.Read()) | ||
419 | { | ||
420 | result.Add(Convert.ToInt32(r["EstateID"])); | ||
421 | } | ||
422 | r.Close(); | ||
423 | |||
424 | return result; | ||
425 | } | ||
426 | |||
405 | public bool LinkRegion(UUID regionID, int estateID) | 427 | public bool LinkRegion(UUID regionID, int estateID) |
406 | { | 428 | { |
407 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); | 429 | SqliteCommand cmd = (SqliteCommand)m_connection.CreateCommand(); |