我的查询:
select libelle,credit_initial,disponible_v,sum(montant) as montant FROM fiche,annee,type where type.id_type=annee.id_type and annee.id_annee=fiche.id_annee and annee = year(current_timestamp) GROUP BY libelle order by libelle asc
我为此进行了艰苦的工作,我已经对其进行了测试,并且它在灯泡服务器mysql版本5.12上正常工作
因此,成功的步骤:
sudo vim /etc/mysql/conf.d/mysql.cnf
[mysqld] sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
到文件的底部
sudo service mysql restart
做完了!