在此过程之前,我尝试使用此代码仅显示用户表,并且效果很好。
$this->db->join('tablename', 'tblanswers.answerid = credentials.cid', 'right outer');
答案 0 :(得分:0)
我认为你可以使用它:
$this->db->query("SELECT * FROM tblanswers ORDER BY answerid DESC LIMIT 1")->row();
有关此内容的更多信息,请访问:https://www.codeigniter.com/user_guide/database/results.html
答案 1 :(得分:0)
$this->db
->join('tablename', 'tblanswers.answerid = credentials.cid', 'right outer')
->order_by('title', 'DESC');