Hi
visitors-traffic-real-time-statistics/functions.php
line 2502
$sql2 query is
SELECT til_page_id, til_page_title, til_hits
FROM ahc_title_traffic where 1=1 $cond
GROUP BY til_page_id
ORDER BY til_hits DESC limit %d, %d
error is
Error Code: 1055. Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘ahc_title_traffic.til_page_title’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
In mysql8 version, sql error occurs due to group by syntax.
That sql doesn’t match the syntax
I think it needs correction.
All columns described in the select clause must be described in the group by clause.
I think the query should be modified as below.
SELECT til_page_id, til_page_title, til_hits
FROM ahc_title_traffic where 1=1 $cond
GROUP BY til_page_id, til_page_title, til_hits
ORDER BY til_hits DESC limit %d, %d
thanks
-
This reply was modified 3 years, 5 months ago by
purityboy83.