I do sample from base. There are two tables with goods and product offers (in one product, and in the other sizes and prices).
I now display goods with all offers (if there are 3 sizes, then 3 identical products are displayed), but only one is needed.
$this->db->select('products.id , pro_title, price , products.offline_store , products.trash, products_offers.barcode , photo_id , modified_date , dictionary.value'); $this->db->from('products'); $this->db->join( 'products_offers' , 'products.ind_id = products_offers.ind_id' ); $this->db->join('dictionary' , 'products.brand = dictionary.id'); $this->db->where('sale_a' , '1'); $query = $this->db->get(); $result = $query->result(); return $result; Tell me how to make the necessary conclusion. Thank.