diff options
| author | Carson Fleming <cflems@cflems.net> | 2017-03-11 01:29:13 -0800 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2017-03-11 01:29:13 -0800 |
| commit | 3d0d3a86106ece4ea298ab2f262b3af5ff8a7728 (patch) | |
| tree | b75b297d980f5b061595cea8b29fe42503907684 /dash/profile.php | |
| parent | a44a0e047a7582fe7e31743e1b03a17cf2987f73 (diff) | |
| download | bulletin-3d0d3a86106ece4ea298ab2f262b3af5ff8a7728.tar.gz | |
Almost there...
Diffstat (limited to 'dash/profile.php')
| -rw-r--r-- | dash/profile.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dash/profile.php b/dash/profile.php index e0db54d..8a448b5 100644 --- a/dash/profile.php +++ b/dash/profile.php @@ -9,7 +9,7 @@ if (!$public) $extra_head .= ' <script type="text/javascript" src="js/profile require('header.php'); $user = $b_user; if ($public) { - $result = $db->query('SELECT users.*, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM users LEFT JOIN ratings ON ratings.rated = users.id LEFT JOIN responses ON responses.uid = users.id WHERE users.id = '.intval($_GET['id']).' AND users.active = 1 AND responses.matched = 1 LIMIT 1') or dash_fatal($db->error); + $result = $db->query('SELECT users.*, SUM(ratings.stars) / COUNT(ratings.stars) AS rating FROM users LEFT JOIN ratings ON ratings.rated = users.id WHERE users.id = '.intval($_GET['id']).' AND users.active = 1 GROUP BY users.id LIMIT 1') or dash_fatal($db->error); $user = $result->fetch_assoc(); $result->free(); if ($user['id'] < 1) dash_fatal('A user with that ID does not exist. You must have reached this page in error.'); |
