diff options
author | Melanie | 2010-02-07 12:06:00 +0000 |
---|---|---|
committer | Melanie | 2010-02-07 12:06:00 +0000 |
commit | c6adbccc27141109f27c9cb9e65fea2b08b07850 (patch) | |
tree | 4a27789eda34939cd5443a2e33268bc82205eb87 /OpenSim | |
parent | Merge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim i... (diff) | |
download | opensim-SC_OLD-c6adbccc27141109f27c9cb9e65fea2b08b07850.zip opensim-SC_OLD-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.gz opensim-SC_OLD-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.bz2 opensim-SC_OLD-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.xz |
Finish the "Get friends" method
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLFriendsData.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLFriendsData.cs b/OpenSim/Data/MySQL/MySQLFriendsData.cs index 9f7e850..e416eea 100644 --- a/OpenSim/Data/MySQL/MySQLFriendsData.cs +++ b/OpenSim/Data/MySQL/MySQLFriendsData.cs | |||
@@ -57,7 +57,12 @@ namespace OpenSim.Data.MySQL | |||
57 | 57 | ||
58 | public FriendsData[] GetFriends(UUID principalID) | 58 | public FriendsData[] GetFriends(UUID principalID) |
59 | { | 59 | { |
60 | return Get("PrincipalID", principalID.ToString()); | 60 | MySqlCommand cmd = new MySqlCommand(); |
61 | |||
62 | 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); | ||
63 | cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString()); | ||
64 | |||
65 | return DoQuery(cmd); | ||
61 | } | 66 | } |
62 | } | 67 | } |
63 | } | 68 | } |