исправлено Ошибка GROUP BY

Lange

Пользователь
#1
Собственно ошибка: Fatal error: DB Error [library/includes/online_userlist.php(64)] in /var/www/open-dns/library/includes/core/mysql.php on line 740

foreach (DB()->fetch_rowset($sql) as $u) {
if ($u['session_logged_in']) {
$stat = array();

Чистый движёк для теста php 7 скачанный из архива в соответствующей теме.
Стоит PHP Version 7.0.8-0ubuntu0.16.04.3, версия mysql 5.7.17-0ubuntu0.16.04.1 - (Ubuntu)
 

drew

Пользователь
#2
Собственно ошибка: Fatal error: DB Error [library/includes/online_userlist.php(64)] in /var/www/open-dns/library/includes/core/mysql.php on line 740

foreach (DB()->fetch_rowset($sql) as $u) {
if ($u['session_logged_in']) {
$stat = array();

Чистый движёк для теста php 7 скачанный из архива в соответствующей теме.
Стоит PHP Version 7.0.8-0ubuntu0.16.04.3, версия mysql 5.7.17-0ubuntu0.16.04.1 - (Ubuntu)
Ошибку то SQL log в студию
 

Lange

Пользователь
#5
Ошибку то SQL log в студию
Сорян.
Код:
#001055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'tp.s.session_logged_in' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT u.username, u.user_id, u.user_opt, u.user_rank, u.user_level, s.session_logged_in, s.session_ip, (s.session_time - s.session_start) AS ses_len, COUNT(s.session_id) AS sessions, COUNT(DISTINCT s.session_ip) AS ips FROM bb_sessions s, bb_users u WHERE s.session_time > 1485056926 AND u.user_id = s.session_user_id GROUP BY s.session_user_id ORDER BY u.username

Source  : library/includes/online_userlist.php(64) :: db1.
IP      : 127.0.0.1
Date    : 2017-01-22 08:53:46
Agent   : Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Req_URI : /
Referer :
Method  : GET
PID     : 19031
Request : Array
(
)______________________________________________________________________________
 
Последнее редактирование модератором:

lexXxa

Пользователь
#6
где созданы под форумы при заходе в сам форум выдает ошибку Fatal error: DB Error [viewforum.php(188)] in /var/www/html/library/includes/core/mysql.php on line 740
Код:
    if ($rowset = DB()->fetch_rowset($sql)) {
        $template->assign_vars(array(
            'SHOW_SUBFORUMS' => true,
            'FORUM_IMG' => $images['forum'],
            'FORUM_NEW_IMG' => $images['forum_new'],
            'FORUM_LOCKED_IMG' => $images['forum_locked'],
        ));
    }


#001055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'forum.t.topic_last_post_time' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

SELECT f.forum_id, f.forum_status, f.forum_last_post_id, f.forum_posts, f.forum_topics, t.topic_last_post_time, t.topic_id AS last_topic_id, t.topic_title AS last_topic_title, p.poster_id AS sf_last_user_id, IF(p.poster_id = -1, p.post_username, u.username) AS sf_last_username, u.user_rank FROM bb_forums f LEFT JOIN bb_topics t ON(f.forum_last_post_id = t.topic_last_post_id) LEFT JOIN bb_posts p ON(f.forum_last_post_id = p.post_id) LEFT JOIN bb_users u ON(p.poster_id = u.user_id) WHERE f.forum_parent = 5 GROUP BY f.forum_id ORDER BY f.forum_order

Source  : viewforum.php(188) :: db1.
IP      :
Date    : 2017-01-24 03:42:58
Agent   : Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 YaBrowser/17.1.0.2034 Yowser/2.5 Safari/537.36
Req_URI : /viewforum.php?f=5
Referer :
Method  : GET
PID     : 16589
Request : Array
(
    [f] => 5
)______________________________________________________________________________
 
Последнее редактирование модератором:
Сверху