<?php
    class home_model extends MY_Model {
       
       function __construct()
       {
            $this->prefix='june_';
       } 
       function getFeatureProductByLang($lang_id='',$limit=''){

           $sql = "SELECT * 
                   FROM  ".$this->prefix."feature as f 
                   LEFT JOIN ".$this->prefix."product as p
                   ON f.product_id = p.product_ref
                   WHERE  p.product_langid = '".$lang_id."' AND p.product_is_active = 'Y' AND f.feature_is_active = 'Y'
                   ORDER BY f.feature_order ASC 
                   LIMIT ".$limit ;
              return $this->db->query($sql)->result_object();
       }
        function getCateProductByLang($lang_id='',$cateid=''){
            $sql = "SELECT  * FROM  june_product WHERE  product_langid = '".$lang_id."' AND product_category = '".$cateid."' ORDER BY product_title ASC" ;
            return $this->db->query($sql)->result_object();
        }

    }
?>
