SELECT g1.group_id, g1.name, COUNT(g2.name) AS level
FROM jos_core_acl_aro_groups AS g1
INNER JOIN jos_core_acl_aro_groups AS g2 ON g1.lft BETWEEN g2.lft AND g2.rgt
WHERE g1.lft BETWEEN 3 AND 12
GROUP BY g1.name
ORDER BY g1.lftSELECT g1.group_id, g1.name, COUNT(g2.name) AS level
FROM jos_core_acl_aro_groups AS g1
INNER JOIN jos_core_acl_aro_groups AS g2 ON g1.lft BETWEEN g2.lft AND g2.rgt
WHERE g1.lft BETWEEN 13 AND 20
GROUP BY g1.name
ORDER BY g1.lft
SELECT a.id, a.title, a.title_alias, a.introtext, a.sectionid, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,
a.checked_out, a.checked_out_time, a.publish_up, a.publish_down, a.images, a.urls, a.ordering, a.metakey, a.metadesc, a.access, a.hits,
CHAR_LENGTH( a.fulltext ) AS readmore, u.name AS author, u.usertype, s.name AS section, cc.name AS category, g.name AS groups
, s.id AS sec_id, cc.id as cat_id
FROM jos_content AS a
INNER JOIN jos_content_frontpage AS f ON f.content_id = a.id
INNER JOIN jos_categories AS cc ON cc.id = a.catid
INNER JOIN jos_sections AS s ON s.id = a.sectionid
LEFT JOIN jos_users AS u ON u.id = a.created_by
LEFT JOIN jos_groups AS g ON a.access = g.id
WHERE a.state = 1
AND ( a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2024-05-09 17:57' )
AND ( a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2024-05-09 17:57' )
AND s.published = 1
AND cc.published = 1
AND a.access <= 0
AND s.access <= 0
AND cc.access <= 0
ORDER BY f.ordering
LIMIT 4
You are not authorised to view this resource. You need to login.