Придумал вот такое решение
SELECT
`p_id`,
`d_id`,
if(`iner_table`.`name` IS NOT NULL,`iner_table`.`name`,`iner_table2`.`name`) as `name`,
if(`iner_table`.`description` IS NOT NULL,`iner_table`.`description`,`iner_table2`.`text`) as `text`,
`dp_links_and_doska`.`section`,
`dp_links_and_doska`.`subsection`,
`dp_links_and_doska`.`inserted` as `date`,
`type`
FROM `dp_links_and_doska`
LEFT OUTER JOIN `photocat` as `iner_table` ON `dp_links_and_doska`.`p_id`=`iner_table`.`id`
LEFT OUTER JOIN `doska_new` as `iner_table2` ON `dp_links_and_doska`.`p_id`=`iner_table2`.`id`
WHERE `d_id`='3'
ORDER BY `date` DESC LIMIT 0,20