I can't read record from column data, why? Code:
$_query = mysqli_query($mysqli , "SELECT o.id,o.surname,o.name,so.data FROM mowcy AS o
LEFT JOIN zeb AS so ON so.id=o.id AND so.mowca=o.mowca
WHERE
o.archiwum = 0
AND o.id<>1
AND o.mowca = 3
GROUP BY o.id
ORDER BY ISNULL(o.id) desc, MAX(so.data) ")
or die(mysqli_error($mysqli));
shows an error:
list is not in GROUP BY clause and contains nonaggregated column 'rafik73_tereny.so.data' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by