zdravim, tato query ma hadze tuto chybu, vedeli by ste povedat, ako to prerobit?
SQL error:
ERROR: column "ar.rules" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT ar.rules, ar.size, ar.per_post, COUNT(f.id) FROM atta...
^
In statement:
SELECT ar.rules, ar.size, ar.per_post, COUNT(f.id) FROM attach_2_rules AS ar, attach_2_files AS f,
posts AS p, topics AS t WHERE group_id=4 AND p.id=3 AND t.id=p.topic_id AND ar.forum_id=t.forum_id
GROUP BY f.post_id LIMIT 1;
skusal som pridat to ar.rules za GROUP BY ale vypisalo to tu istu chybu s tym, ze musim musim zmenit zasa ar.size ... (len ukazalo z ar.rules na ar.size, cize sa ta chyba len posunula ...)
Diky