mySQL question

mySQL question

Can any of you gurus help me figure out where to start trouble shooting this error:

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, u2.username as ratedby, u2.rating_status, u2.user_id as ratedby_id 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 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 f.auth_view <= 1 AND f.auth_read <= 1 AND r.option_id = ro.option_id AND p.rating_rank_id = rt.rating_rank_id AND t.forum_id = 1 AND (i.bias_status IS NULL OR i.bias_status != 1) ORDER BY r.rating_time DESC LIMIT 20

Line : 299
File : ratings.php
I'm double and triple checking the database, but I can't really see anything wrong.
 

alexzed

Diabloii.Net Member
Been a long time, but would

phpbb_rating_option ro,

be better as

phpbb_rating_option.ro,

Dunno...just a stab
 
Top