SELECT pl_links.*,pl_categories.name AS category_name,pl_categories.id AS category_id, pl_links.total_rating/pl_links.num_ratings AS rating FROM pl_links,pl_categories WHERE pl_links.category_id = pl_categories.id AND pl_links.approved = 1 ORDER BY id DESC LIMIT 5

Table './pcresour_pllink/pl_links' is marked as crashed and should be repaired