【发布时间】:2014-03-28 05:12:02
【问题描述】:
我知道你是这样调用和传递不同表中的列的:
$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();
但是因为我只选择了用户名和标题,所以我不能从任何一个表中调用其他剩余的列。我该怎么做?
我尝试将 SELECT 更改为(从 content_table 中获取 Body 列的数据):
$this->db->select('ut.Username,ct.Title','ct.Body',false);
但它没有工作。
【问题讨论】:
标签: php codeigniter