BF2Statistics.Web.ASP.GetPlayerInfo.GetPlayerTopVitcimAndOpp C# (CSharp) Method

GetPlayerTopVitcimAndOpp() private method

Fills the Top Opponent and Victim Variables
private GetPlayerTopVitcimAndOpp ( ) : void
return void
        private void GetPlayerTopVitcimAndOpp()
        {
            // Create a new DB Row
            List<Dictionary<string, object>> Row;

            // Victim
            Rows = Database.Query("SELECT victim, count FROM kills WHERE attacker=@P0 ORDER BY count DESC LIMIT 1", Pid);
            if (Rows.Count != 0)
            {
                // Fetch Victim
                Row = Database.Query("SELECT name, rank FROM player WHERE id=@P0", Rows[0]["victim"]);
                if (Row.Count != 0)
                {
                    Out["tvcr"] = Rows[0]["victim"];
                    Out["mvks"] = Rows[0]["count"];
                    Out["mvns"] = Row[0]["name"];
                    Out["mvrs"] = Row[0]["rank"];
                }
            }

            // Opponent
            Rows = Database.Query("SELECT attacker, count FROM kills WHERE victim=@P0 ORDER BY count DESC LIMIT 1", Pid);
            if (Rows.Count != 0)
            {
                // Fetch Opponent
                Row = Database.Query("SELECT name, rank FROM player WHERE id=@P0", Rows[0]["attacker"]);
                if (Row.Count != 0)
                {
                    Out["topr"] = Rows[0]["attacker"];
                    Out["vmks"] = Rows[0]["count"];
                    Out["vmns"] = Row[0]["name"];
                    Out["vmrs"] = Row[0]["rank"];
                }
            }
        }