начните с этого, может поможет
SELECT dta.id, dta.doc_name, dta.doc_title, dta.link, dta.status, GROUP_CONCAT(DISTINCT dty.doc_id ORDER BY dty.doc_id ASC SEPARATOR ', ') AS type_id
FROM doc_table dta
INNER JOIN docs_types dty ON dta.id=dty.doc_id
GROUP BY dta.id;
или
SELECT dta.id, dta.doc_name, dta.doc_title, dta.link, dta.status, GROUP_CONCAT(DISTINCT t.type_name ORDER BY t.id ASC SEPARATOR ', ') AS type_name
FROM doc_table dta
INNER JOIN docs_types dty ON dta.id=dty.doc_id
INNER JOIN types t ON t.id=dty.type_id
GROUP BY dta.id;