The query below returns everything requested but I would like to modify it so that if there is no project_id (and therefore, no project.name), it will still pull that record.
function awardsList($year)
{
$query = $this->db->query("
SELECT award_detail.award, award_detail.organization, award.year, project.name
FROM award_detail
INNER JOIN award ON award.id = award_detail.award_id
INNER JOIN project ON project.id = award.project_id
WHERE award.year = $year
ORDER BY award_detail.id DESC
");
return $query->result();
}
A left-join will always bring the row from the left table in the join (the table you are joining to) and will optionally fill the values from the table to the right with NULL if no matching row was found.