SELECT DISTINCT(ic.image_id) AS image_id,ic.category_id, uppercats
  FROM phpwebgallery_comments AS c, phpwebgallery_image_category AS ic
    , phpwebgallery_categories AS cat
  WHERE c.image_id = ic.image_id
    AND ic.category_id = cat.id
    AND date >= '2025-07-21'
    AND validated = 'true'
    AND category_id NOT IN (17,6,8,23,24,29)
  GROUP BY ic.image_id
  ORDER BY ic.image_id DESC
;
[mysql error 1146] Table 'geantropie.phpwebgallery_comments' doesn't exist