<?php
class View_data extends CI_Model{
	function getcompany_profile(){
       return $this->db->select('*')
                   ->from('company_profile')
				  // ->order_by('c_id', 'DESC')
                   //->where('status','Enable')
                   ->get()->result();
    }
	function getabout_us(){
       return $this->db->select('*')
                   ->from('pages')
				   //->order_by('p_id', 'DESC')
                   ->where('p_name','About Us')
                   ->get()->result();
    }
	function gettechnology()
	{
       return $this->db->select('*')
                   ->from('pages')
				   //->order_by('p_id', 'DESC')
                   ->where('p_name','Technology')
                   ->get()->result();
    }
	function getservices_amc()
	{
       return $this->db->select('*')
                   ->from('pages')
				   //->order_by('p_id', 'DESC')
                   ->where('p_name','Services & AMC')
                   ->get()->result();
    }
	function gettech(){
       return $this->db->select('*')
                   ->from('pages')
				   //->order_by('p_id', 'DESC')
                   ->where('p_name','Technology')
                   ->get()->result();
    }
	function getslider(){
       return $this->db->select('*')
                   ->from('slider')
				   //->order_by('s_id', 'DESC')
                   //->where('p_name','Technology')
                   ->get()->result();
    }
	function getproduct(){
       return $this->db->select('*')
                   ->from('product')
				   //->order_by('s_id', 'DESC')
                   ->where('p_status','Enable')
                   ->get()->result();
    }
	function getproduct_images()
	{
		 return $this->db->select('*')
                   ->from('sub_products')
                   ->where('sp_status','Enable')
				   ->order_by('sp_id', 'RANDOM')
                   ->limit(6)
				   ->get()->result();
	}
	function getproduct_id($p_id){
       return $this->db->select('*')
                   ->from('product')
				   //->order_by('s_id', 'DESC')
                   ->where('p_id', $p_id)
                   ->get()->result();
    }

	function getsub_product($p_id){
		 return $this->db->select('*')
                   ->from('sub_products')
                   ->where('p_id', $p_id)
                   ->where('sp_status','Enable')
				   ->get()->result();
	}
	function getsub_product_id($sp_id)
	{
		 return $this->db->select('*')
                   ->from('sub_products')
                   ->where('sp_id', $sp_id)
                   ->get()->result();
	}
	function getgallery(){
       return $this->db->select('*')
                   ->from('portfolio')
				   //->order_by('s_id', 'DESC')
                   //->where('p_name','Technology')
                   ->get()->result();
    }
	
   function getgallery_random(){
       return $this->db->select('*')
                   ->from('portfolio')
				   ->order_by('i_id', 'RANDOM')
                   ->limit(4)
                   ->get()->result();
    }

}