【发布时间】:2016-08-23 07:48:30
【问题描述】:
function get_all_notification() { //get all notification based on the 'notification' table left join by 'membership' table
$this->db->select()->from('notification')->join('membership','membership.membership_id = notification.notif_id','left'); $notif = $this->db->get();
return $notif->result();
}
我无法显示会员表中的字段。
【问题讨论】:
-
使用 select('membership.membership_id,membership.other_names,notification.*')
-
@Kool-Mind 你的意思是查询字符串而不是上面的那个?
-
select() 也应该填写会员的列名尝试 select('notification.*,membership.*') 并让我看看它是否有效
-
每个推荐评论或答案都说同样的 :)。我也用更长的代码来回答,以便于查看。这只是为了眼睛,但为大家加油:)
-
@jackskiee 对你有帮助吗?如果有任何其他建议,请告诉我
标签: php android mysql codeigniter