aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLFriendsData.cs
diff options
context:
space:
mode:
authorMelanie2010-02-07 12:06:00 +0000
committerMelanie2010-02-07 12:06:00 +0000
commitc6adbccc27141109f27c9cb9e65fea2b08b07850 (patch)
tree4a27789eda34939cd5443a2e33268bc82205eb87 /OpenSim/Data/MySQL/MySQLFriendsData.cs
parentMerge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim i... (diff)
downloadopensim-SC-c6adbccc27141109f27c9cb9e65fea2b08b07850.zip
opensim-SC-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.gz
opensim-SC-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.bz2
opensim-SC-c6adbccc27141109f27c9cb9e65fea2b08b07850.tar.xz
Finish the "Get friends" method
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLFriendsData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLFriendsData.cs7
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}