SELECT a.*, b.type
FROM `dashboard` `a`
JOIN _ref__dashboard_type b ON b.ID = a.dashboardTypeID
LEFT OUTER JOIN dashboard__people c ON a.ID = c.dashboardID and c.peopleID = 12
WHERE `a`.`publish` = 1