my Query :
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
I had a struggle getting this to work i've tested it and it's working on lamp server mysql version 5.12
So, steps to success:
sudo vim /etc/mysql/conf.d/mysql.cnf
Scroll to the bottom of file Copy and paste
[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
to the bottom of the file
sudo service mysql restart
to restart MySQL.Done!