mysql Error [1064] : EXECUTE
URI: index.php?option=com_content&task=blogcategory&id=17&Itemid=71
Message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups, (SELECT COUNT(z.cid) FROM elx_comments z WHERE z.origin='1' AND z.articl' at line 2
SELECT a.*, ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count, u.name AS author, u.usertype,
cc.name AS category, cc.seotitle AS catseotitle, s.name AS section, s.seotitle AS secseotitle, g.name AS groups, (SELECT COUNT(z.cid) FROM elx_comments z WHERE z.origin='1' AND z.articleid = a.id AND z.published='1') AS comments
FROM elx_content a
LEFT JOIN elx_categories cc ON cc.id = a.catid
LEFT JOIN elx_users u ON u.id = a.created_by
LEFT JOIN elx_content_rating v ON a.id = v.content_id
LEFT JOIN elx_sections s ON a.sectionid = s.id
LEFT JOIN elx_core_acl_aro_groups g ON a.access = g.group_id
WHERE a.state = '1'
AND ( a.publish_up = '1979-12-19 00:00:00' OR a.publish_up <= '2024-07-27 17:20:36' )
AND ( a.publish_down = '2060-01-01 00:00:00' OR a.publish_down >= '2024-07-27 17:20:36' )
AND a.access IN (29)
AND a.catid IN (17)
AND s.access IN (29)
AND a.access IN (29)
AND cc.published = '1'
AND s.published = '1'
AND ((a.language LIKE '%english%') OR (a.language IS NULL))
AND ((cc.language LIKE '%english%') OR (cc.language IS NULL))
AND ((s.language LIKE '%english%') OR (s.language IS NULL))
ORDER BY a.created