你好,我想加入三個表,但它從用戶表中獲取所有數據,我只想要firstname和lastname參數如何從codeigniter中的連接表中獲取有限的數據參數?
這是我的連接查詢。我想要像加入(user.firstname)的東西。
$this->db->select('*');
$this->db->from('post');
$this->db->join('user', 'user.id = post.cop_id');
$this->db->join('source', 'post.source_id = source.id');
$query = $this->db->get();
return $query->result();
感謝您對我的迴應:) – yogendrayaduvanshi