Php CodeIgniter检索连接列和未连接列?

Php CodeIgniter检索连接列和未连接列?,php,codeigniter,Php,Codeigniter,我知道这就是从不同的表中调用和传递列的方式: $this->db->select('ut.Username,ct.Title',false); $this->db->from('username_table AS ut'); $this->db->join('content_table AS ct', 'ct.UserID = ut.UserID'); $query = $this->db->get('content_table'); retur

我知道这就是从不同的表中调用和传递列的方式:

$this->db->select('ut.Username,ct.Title',false); 
$this->db->from('username_table AS ut');
$this->db->join('content_table AS ct', 'ct.UserID = ut.UserID');
$query = $this->db->get('content_table');
return $query->result_array();
但因为我只选择了Username和Title,所以无法从这两个表中调用其余的列。我该怎么做

我尝试将SELECT更改为(从content_表获取Body列的数据):

但是没用。

你可以试试这个

$this->db->select('ut.Username,ct.*',false); 
    $this->db->from('username_table ut');
    $this->db->join('content_table ct', 'ct.UserID = ut.UserID');
    $query = $this->db->get('content_table');
    return $query->result_array();
而不是:

$this->db->select('ut.Username,ct.Title','ct.Body',false);
尝试:

$this->db->select('ut.Username,ct.Title','ct.Body',false);
$this->db->select('ut.Username,ct.Title,ct.Body',false);