[mythtv-commits] Ticket #12889: mysql error
MythTV
noreply at mythtv.org
Wed Sep 28 19:10:53 UTC 2016
#12889: mysql error
-------------------------------------+-------------------------------------
Reporter: jbeck2@… | Owner: stuarta
Type: Bug Report - | Status: new
General |
Priority: blocker | Milestone: unknown
Component: Plugin - MythWeb | Version: Unspecified
Severity: high | Keywords: mysql
Ticket locked: 0 | ONLY_FULL_GROUP_BY
-------------------------------------+-------------------------------------
[0] => SQL Error: Expression #3 of SELECT list is not in GROUP BY clause
and contains nonaggregated column 'mythconverg.program.endtime' which is
not functionally dependent on columns in GROUP BY clause; this is
incompatible with sql_mode=only_full_group_by [#1055]
see: http://stackoverflow.com/questions/34115174/i-am-getting-an-error-in-
mysql-related-to-only-full-group-by-when-executing-a-qu
where it says: (#18)
you can turn of the warning as explained in the other answers or you can
understand what's happening and fix it.
As of MySQL 5.7.5, the default SQL mode includes ONLY_FULL_GROUP_BY which
means when you are grouping rows and then selecting something out of that
groups, you need to explicitly say which row should that selection be made
from. Mysql needs to know which row in the group you're looking for, which
gives you two options
Mysql needs to know which row in the group you're looking for, which gives
you two options
You can also add the column you want to the group statement group by
rect.color, rect.value which can be what you want in some cases otherwise
would return duplicate results with the same color which you may not want
you could also use aggregate functions of mysql to indicate which row
you are looking for inside the groups like AVG() MIN() MAX() complete list
--
Ticket URL: <https://code.mythtv.org/trac/ticket/12889>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list