MySQL Forums
Forum List  »  PHP

Error after upgrading MySQL to 5.7
Posted by: Ludwig Arcache
Date: October 07, 2019 03:16AM

Hello,

I upgraded my VPS server MySQL version from 5.6 to 5.7.27
1 of the hosted websites gives errors, mainly the error is :

=================
SQL Error! Guilty SQL: SELECT week_nr, year FROM dailydishes_to_week GROUP BY week_nr ORDER BY week_nr DESC
Actual Error: [Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'eliemigh_roula.dailydishes_to_week.year' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by]
=================

In file mysql.class.php line 133, i found this function:

=================
public function doQuery($sql) {
if ( $this->track ) {
$m_time = microtime(true);
}

$this->result = $this->con->query($sql) or die(trigger_error('SQL Error! Guilty SQL: ' . $sql . '<br />Actual Error: [' .$this->con->error . ']') );

if ( $this->track ) {
$m_time = microtime(true) - $m_time;
$this->qt_time += $m_time;
$this->set_track($sql, $m_time);
}
}
=================

Can someone help me fix it ? because I'm not expert in MySQL.

Thanks

Options: ReplyQuote


Subject
Written By
Posted
Error after upgrading MySQL to 5.7
October 07, 2019 03:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.