aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLUserAccountData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLUserAccountData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserAccountData.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
index aa69d68..92afa75 100644
--- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Data.MySQL
72 } 72 }
73 else 73 else
74 { 74 {
75 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst or LastName like ?searchLast)", m_Realm); 75 cmd.CommandText = String.Format("select * from {0} where (ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (FirstName like ?searchFirst and LastName like ?searchLast)", m_Realm);
76 cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); 76 cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%");
77 cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); 77 cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%");
78 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); 78 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL
80 80
81 return DoQuery(cmd); 81 return DoQuery(cmd);
82 } 82 }
83
84 public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
85 {
86 MySqlCommand cmd = new MySqlCommand();
87
88 if (scopeID != UUID.Zero)
89 {
90 where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")";
91 cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
92 }
93
94 cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm);
95
96 return DoQuery(cmd);
97 }
83 } 98 }
84} 99}