【发布时间】:2017-01-11 12:04:13
【问题描述】:
我的代码:
$this->db->join('followers','followers.id_follower = post.id_account','LEFT');
$id_account = $this->session->userdata('id');
$where = ("followers.id_following=$id_account or post.id_account = $id_account");
$this->db->where($where);
请帮帮我
【问题讨论】:
-
这段代码会发生什么?你提取并循环提取了吗?
-
你需要使用 $this->db->select 和 $this->db->get()
-
如何获取id_following
-
如何获取id_following在哪里?
-
以上代码只显示基于id_following的会话不全面:$where = ("followers.id_following=$id_account or post.id_account = $id_account");
标签: php mysql codeigniter model