how to write orderby in join query with where clause in codeigniter

$this->db->select('*'); $this->db->from('table1'); $this->db->join('table2', 'table1.id = table2.id'); $this->db->where('table1.status', 'active'); $this->db->order_by('table1.name', 'ASC'); $query = $this->db->get();