From 53a82864687431d295ab3e18ad1bfe9ed1a2229f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 1 Mar 2010 21:35:46 -0800 Subject: [PATCH] Changed the query in GetFriends in SQLite to match the one in MySql. --- OpenSim/Data/SQLite/SQLiteFriendsData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Data/SQLite/SQLiteFriendsData.cs b/OpenSim/Data/SQLite/SQLiteFriendsData.cs index 399680d65c..0b121826d6 100644 --- a/OpenSim/Data/SQLite/SQLiteFriendsData.cs +++ b/OpenSim/Data/SQLite/SQLiteFriendsData.cs @@ -46,7 +46,7 @@ namespace OpenSim.Data.SQLite { SqliteCommand cmd = new SqliteCommand(); - 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 and b.Flags is not null", m_Realm); + cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end 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.Add(":PrincipalID", userID.ToString()); return DoQuery(cmd);