Php 在Codeigniter中的联接查询中获取数组结果时出错
您好,这是我的查询,我在获取结果\u数组时遇到问题 这就是错误: 致命错误:在第6行的C:\xampp\htdocs\plss\application\views\Admin\post\u refresh.php中的非对象上调用成员函数result\u数组 试试这个:Php 在Codeigniter中的联接查询中获取数组结果时出错,php,mysql,sql,codeigniter,Php,Mysql,Sql,Codeigniter,您好,这是我的查询,我在获取结果\u数组时遇到问题 这就是错误: 致命错误:在第6行的C:\xampp\htdocs\plss\application\views\Admin\post\u refresh.php中的非对象上调用成员函数result\u数组 试试这个: $post = $this->db->get()->result_array(); foreach($post as $row): //etc 试试这个: $post->result() as $
$post = $this->db->get()->result_array();
foreach($post as $row): //etc
试试这个:
$post->result() as $row
谢谢你们的帮助,我刚刚解决了这个问题,我用了这样的东西$query=$this->db->queryselect*from forum\u thread left join db\u useraccount上的db\u useraccount.user\u id=forum\u thread.user\u id ORDER BY thread\u id DESC;谢谢你们的帮助,我刚刚解决了这个问题,我用了这样的东西$query=$this->db->queryselect*from forum\u thread left join db\u useraccount上的db\u useraccount.user\u id=forum\u thread.user\u id ORDER BY thread\u id DESC;
$post->result() as $row