1055: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'nsvijet_aa999.r.titula' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: 'select r.naziv, r.titula, vr.naziv as _status, vr.boja, r.img, r.id, if(max(p.datum_do)=0, max(p.datum_od), max(p.datum_do)) as datum, r.spol, r.puni_prikaz, if(if(max(p.datum_do)=0, max(p.datum_od), max(p.datum_do))>now(), 'A', 'Z') as aktivan from resurs r left join resurs_veza ve on r.id=ve.resurs_id left join resurs_vrsta vr on ve.resurs_vrsta_id=vr.id left join platforma p on ve.platforma_id=p.id where vr.id=32 group by r.naziv order by puni_prikaz desc, datum desc, naziv asc ')