SELECT category_id,uppercats,commentable,global_rank
  FROM phpwebgallery_image_category
    INNER JOIN phpwebgallery_categories ON category_id = id
  WHERE image_id = 5657
;
[mysql error 2006] MySQL server has gone away