Why do I get this error below on mysqlnd 5.0.12-dev:
1055 - Expression #29 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db_name.p2.url' which is not
functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Query:
SELECT p.* ,
p2.article_id AS parent_id ,
p2.url AS parent_url ,
p3.article_id AS parent_parent_id ,
p3.url AS parent_parent_url ,
p3.title AS parent_parent_title
FROM article AS p
LEFT JOIN article AS p2
ON p2.article_id = p.parent_id
AND p.article_id <> p2.article_id
LEFT JOIN article AS p3
ON p3.article_id = p2.parent_id
AND p2.article_id <> p3.article_id
WHERE p.url = 'contact'
AND p.type = 'page'
AND p.hide = '0'
GROUP BY p.article_id
ORDER BY p.backdated_on DESC
The query works fine on mysqlnd 5.0.11-dev.
Any ideas what is going on?
sudo apt-get install mysql-server mysql-clientthat i follow from an online guide for installing mysql. what is the correct command line to install the latest mysql then? - laukokmysql -Voutput:mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64) using EditLine wrapper- laukokDatabase client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 241ae00989d1995ffcbbf63d579943635faf9972 $- laukok