how to use DISTINCT here in my query CODEIGNITER

前端 未结 5 1149
野趣味
野趣味 2020-12-20 13:40
$q = $this->db->select(\'
             books.title,
             reserved_books.id,
             reserved_books.isbn, 
             reserved_books.price,
              


        
5条回答
  •  轮回少年
    2020-12-20 14:43

    You don't need any join

     $query=$this->db->distinct()->select('table_attribute')->where('condition')->get('table_name');
      return $query->result();
    

提交回复
热议问题