Im working on a widgets that provides me the newest comments in a given area. I want to make sure, that just the newest comment (and only one per post) are shown.
Therefore i want to group the comments by comment_post_ID.
But if i do
"SELECT comment_ID, comment_post_ID FROM wp_comments GROUP BY comment_post_ID"
i get the message:
"SELECT list is not in GROUP BY clause and contains nonaggregated column 'wp_comments.comment_ID' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by.
Any idea how to solve this? Struggeling with this for a while now.