Page 1 of 1

Highest Rated User

PostPosted: Sat Aug 18, 2007 9:58 am
Author: Max Paint
I have a problem with the rating function. Topics, etc. are ok, but when I want to show highest ranked USERS I get the following error-message:

Couldn't obtain post rating information

DEBUG MODE

SQL Error : 1054 Unknown column 'r.user_id' in 'on clause'

SELECT t.topic_title, t.rating_rank_id AS topic_rating, p.rating_rank_id AS post_rating, t.topic_id, u.username, u.user_id, r.rating_time, ro.label, ro.points AS label2, f.forum_id, p.post_id, rk.rank_image, rk.rank_title, ROUND(AVG(ro.points),1) AS points, u.user_posts, u.user_gender, u.user_rank FROM (phpbb_rating r, phpbb_topics t, phpbb_users u, phpbb_posts p, phpbb_forums f, phpbb_users u2, phpbb_rating_option ro, phpbb_rating_rank rt), phpbb_ranks rk LEFT JOIN phpbb_rating_bias i ON i.user_id = 2 AND r.user_id = i.target_user WHERE r.post_id = p.post_id AND p.poster_id = u.user_id AND r.user_id = u2.user_id AND p.topic_id = t.topic_id AND t.topic_status = 0 AND t.forum_id = f.forum_id AND r.option_id = ro.option_id AND f.forum_id in (2, 3, 13, 18, 27, 24, 29, 10, 4, 5, 14, 17, 7, 19, 28, 11, 26, 6, 16, 9) AND r.post_id = t.topic_first_post_id AND p.rating_rank_id = rt.rating_rank_id AND u.user_rank = rk.rank_id AND t.forum_id = 14 AND (i.bias_status IS NULL OR i.bias_status != 1) GROUP BY p.poster_id ORDER BY points DESC, u.user_posts LIMIT 20

Line : 331
File : ratings.php


Any idea?

PostPosted: Sat Aug 25, 2007 8:43 am
Author: zenrei
usually when you get an unknown column error it means that the sql table doesn't exist