Oh, nur um sicher zu gehen, dass ich dich bei der Datenbankabfrage auch richtig verstanden habe...
SELECT
`cms_menues`.`name` AS `menuName`,
`cms_menu_pages`.`leftkey`,
`cms_menu_pages`.`rightkey`,
`cms_pages`.`id`,
`cms_pages`.`name`
FROM `cms_menu_pages`
JOIN `cms_pages`
ON `cms_menu_pages`.`page_id` = `cms_pages`.`id`
JOIN `cms_menues`
ON `cms_menu_pages`.`menu_id` = `cms_menues`.`id`
WHERE `cms_pages`.`id`
IN(
SELECT
`cms_content`.`page_id`
FROM `cms_content`
JOIN `cms_rights`
ON `cms_content`.`id` = `cms_rights`.`content_id`
WHERE `cms_content`.`page_id`
IN(
SELECT `cms_pages`.`id`
FROM `cms_menu_pages`
JOIN `cms_pages`
ON `cms_menu_pages`.`page_id` = `cms_pages`.`id`
WHERE `cms_menu_pages`.`menu_id` = ?
)
AND `cms_rights`.`group_id`
IN(
SELECT `cms_user_groups`.`group_id`
FROM `cms_user_groups`
WHERE `cms_user_groups`.`user_id` = ?
)
)
AND `cms_menu_pages`.`menu_id` = ?
ORDER BY `cms_menu_pages`.`leftKey`
Ich habe in der vorletzten Zeile also nur den "GROUP BY"-Teil durch "AND cms\_menu\_pages
..." ersetzt. War das richtig?