Finish the "Get friends" method
parent
e251f42443
commit
c6adbccc27
|
@ -57,7 +57,12 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
public FriendsData[] GetFriends(UUID principalID)
|
public FriendsData[] GetFriends(UUID principalID)
|
||||||
{
|
{
|
||||||
return Get("PrincipalID", principalID.ToString());
|
MySqlCommand cmd = new MySqlCommand();
|
||||||
|
|
||||||
|
cmd.CommandText = String.Format("select a.*,b.Flags as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID = ?PrincipalID", m_Realm);
|
||||||
|
cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString());
|
||||||
|
|
||||||
|
return DoQuery(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue