AnsweredAssumed Answered

Developer Portal - Forum Query Error

Question asked by mcowan on Oct 17, 2016
Latest reply on Oct 17, 2016 by Mark_HE

Context - API Gateway (v9.1) and Portal (v3.5) images within AWS with RDS.

 

Forum Admin Control Panel.

 

When the Message Approving link is clicked... An error is thrown with the following message...

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'f.forum_id' in 'on clause'

 

The query that is being executed is...

 

SELECT c.categories_id, c.title, f.forum_id, n.forum_name, COUNT(p.post_id) AS total
FROM jforum_categories c, jforum_forums f, jforum_posts p
JOIN jforum_forum_names n on n.forum_id = f.forum_id and n.lang = 'en'
WHERE p.need_moderate = 1 AND p.forum_id = f.forum_id AND f.categories_id = c.categories_id
GROUP BY c.categories_id, c.title, f.forum_id, n.forum_name

 

if I change this query to include parenthesis around the "FROM" statement it works...

 

SELECT c.categories_id, c.title, f.forum_id, n.forum_name, COUNT(p.post_id) AS total
FROM (jforum_categories c, jforum_forums f, jforum_posts p)
JOIN jforum_forum_names n on n.forum_id = f.forum_id and n.lang = 'en'
WHERE p.need_moderate = 1 AND p.forum_id = f.forum_id AND f.categories_id = c.categories_id
GROUP BY c.categories_id, c.title, f.forum_id, n.forum_name

 

Is this a BUG?  How/Where can I update this query?

Outcomes