Photo Gallery

select tbl_piccategory.piccatename_eng,(tbl_piccategory.piccatid),count(tbl_picgallery.picid) as COUNTCAT FROM tbl_piccategory , tbl_picgallery where tbl_picgallery.piccategory=tbl_piccategory.piccatid and tbl_picgallery.picstatus=1 and tbl_piccategory.picstatus=1 group by tbl_piccategory.piccatename_eng order by tbl_piccategory.sortorder desc - Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 's0417pnd_pndweb.tbl_piccategory.piccatid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by