User 'shakishadb1' has exceeded the 'max_questions' resource (current value: 23769) SQL=SELECT m.*, sum(case when p.published=1 then 1 else 0 end) as cnt
FROM hug_menu AS m
LEFT JOIN hug_menu AS p ON p.parent = m.id
WHERE m.menutype='mainmenu' AND m.published='1' AND m.access <= '0'
GROUP BY m.id ORDER BY m.parent, m.ordering