Skip to content

Instantly share code, notes, and snippets.

@Manaus
Last active February 3, 2022 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Manaus/db2b47679d8bda865576a1b00b4f7f3c to your computer and use it in GitHub Desktop.
Save Manaus/db2b47679d8bda865576a1b00b4f7f3c to your computer and use it in GitHub Desktop.
MySQL Error (3065): Expression #1 of ORDER BY clause is not in SELECT list, references column 'mydb.p.sortorder' which is not in SELECT list; this is incompatible with DISTINCT in 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 on 845 of file /Users/.../symphony/lib/toolkit/class.mysql.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment