Symphony Fatal Database Error: Expression #1 of ORDER BY clause is not in SELECT list, references column 'phoenl_luxury.p.sortorder' which is not in SELECT list; this is incompatible with DISTINCT
An error occurred while attempting to execute the following query
-
SELECT SQL_CACHE DISTINCT p.id, p.title, p.handle, (SELECT COUNT(id) FROM `sym_pages` WHERE parent = p.id) AS children
FROM `sym_pages` AS p
LEFT JOIN `sym_pages_types` AS pt ON (p.id = pt.page_id)
WHERE 1 = 1
AND p.parent IS NULL
ORDER BY p.`sortorder` ASC