Warning: [mysql error 145] Table './photo/photo_images' is marked as crashed and should be repaired

SELECT DISTINCT(image_id)
  FROM photo_image_category
    INNER JOIN photo_images ON id = image_id
  WHERE
    category_id = 467
AND (category_id NOT IN (238))
  ORDER BY name ASC, file ASC, id ASC
; in E:\Web\ncp\photo\include\dblayer\functions_mysqli.inc.php on line 856
Fatal error: Call to a member function fetch_assoc() on boolean in E:\Web\ncp\photo\include\dblayer\functions_mysqli.inc.php on line 917