Change avatar picker search to work properly when two name parts are used

avinationmerge
Melanie 2011-03-12 13:06:13 +01:00
parent 9165a5207d
commit 4a5560a86e
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ namespace OpenSim.Data.MySQL
} }
else else
{ {
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); 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);
cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%"); cmd.Parameters.AddWithValue("?searchFirst", "%" + words[0] + "%");
cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%"); cmd.Parameters.AddWithValue("?searchLast", "%" + words[1] + "%");
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());