MySQL server has gone away
SELECT c.id, c.parent, c.name, c.new, c.action, c.action_url, c.link, cc.name, cc.new, cc.action, cc.action_url, c.new_url FROM catalogue_categories c LEFT JOIN catalogue_categories cc ON (c.link != 0 AND c.link = cc.id) ORDER BY c.position ASC