diff --git a/pages/wot/10.php b/pages/wot/10.php
index f355002..51ed019 100644
--- a/pages/wot/10.php
+++ b/pages/wot/10.php
@@ -23,15 +23,21 @@
- $query = "SELECT `users`. *, count(*) AS `list` FROM users inner join notary on users.id=notary.`from`
- AND `notary`.`from` != `notary`.`to`
+ $query = "SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
+ WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
AND `from`='".intval($_SESSION['profile']['id'])."' GROUP BY `notary`.`from`";
$res = mysql_query($query);
$row = mysql_fetch_assoc($res);
$rc = intval($row['list']);
- $query = "SELECT `users`. *, count(*) AS `list` FROM `users` inner join `notary` on
- `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
+/*
+ $query = "SELECT `users`. *, count(*) AS `list` FROM `users`, `notary`
+ WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to`
GROUP BY `notary`.`from` HAVING count(*) > '$rc' ORDER BY `notary`.`when` DESC";
+*/
+ $query = "SELECT count(*) AS `list` FROM `users`
+ inner join `notary` on `users`.`id` = `notary`.`from`
+ GROUP BY `notary`.`from` HAVING count(*) > '$rc'";
+
$rank = mysql_num_rows(mysql_query($query)) + 1;
?>
=sprintf(_("You have made %s assurances which ranks you as the #%s top assurer."), intval($rc), intval($rank))?> |