$sql_top=mysql_query("SELECT ref,COUNT(ref) AS count FROM users GROUP BY ref ORDER BY count DESC LIMIT 10");