Tables are: user_table(user_id, user_name) , votes_table(id,user_id, vote_date, votes)
$sql = SELECT user_id, sum(votes) AS sumvotes, vote_date
FROM votes_table
WHERE vote_date > 1279749600
ORDER BY sumvotes DESC
LIMIT 10
$result = query($sql)
foreach user_id in $result
$sql = SELECT user_id, username
FROM user_table u
WHERE u.user_id = user_id
$result2 = query($sql)
somearray.add($result AND $result2)