SELECT com.id AS comment_id
     , com.image_id
     , ic.category_id
     , com.author
     , com.date
     , com.content
     , com.id AS comment_id
  FROM phpwebgallery_image_category AS ic
    INNER JOIN phpwebgallery_comments AS com
    ON ic.image_id = com.image_id
  WHERE validated = 'true'
    AND date > SUBDATE(CURDATE(), INTERVAL 1 DAY)
    AND 1=1
    AND 1=1
    AND 1=1
    AND category_id NOT IN (133,132,125,162,128,129,130,131,124,172,123,119,120,121,161,118,116,173,180,182,183,184,195,196,197,198,199,204,210,231,237,241,244,249,250,251,252,266,267,268,269,270,272,273,274,275,297,298,320,321,322,323,324,334,230,-1)
  GROUP BY comment_id
  ORDER BY date DESC
  LIMIT 0,5
;
[mysql error 1] Can't create/write to file '/tmp/#sql146_2fec3_1.MYI' (Errcode: 28)