A Database Error Occurred

Error Number: 1055

Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'elections_admin.a.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

select a.*,(select engname from state where id = a.stateid)eng_statename,(select engname from party where id = a.partyid)eng_partyname,count(a.noofvotes)as votes ,(select telname from state where id = a.stateid)tel_statename,(select telname from district where id = a.distid )tel_distname,(select telname from constituency where id = a.constid)tel_constname,(select telshortname from party where id=a.partyid)tel_partyname,(select telname from candidate where id=a.candidateid)tel_candidatename,(select symbolpath from party where id = a.partyid)symbol,(select color from party where id = a.partyid)party_color from results a where a.constid = (select id from constituency where engname like "kakinada_rural" and status = 1 and constlevel=1) and a.status=1 and year !=0 and a.constlevel=1 group by a.partyid,year order by a.year desc,votes desc;

Filename: models/Andhra_pradeshm.php

Line Number: 151