<?php
Class Payment_Model extends CI_Model
{
  
    function get_individual_price()
    {	
      //Change Below
      $q = $this->db->select('price')
		    ->from('payment')
                    ->where('type', 'individual');
        
 
      //save result for all items
      $ret['rows'] = $q->get()->result();
             
                
      return $ret;
    }
    
    function get_company_price()
    {	
      //Change Below
      $q = $this->db->select('price')
		    ->from('payment')
                    ->where('type', 'company');
        
 
      //save result for all items
      $ret['rows'] = $q->get()->result();
                
                
      return $ret;
    }
    
    
    function get_listing_price()
    {	
      //Change Below
      $q = $this->db->select('price')
		    ->from('payment')
                    ->where('type', 'listing');
        
 
      //save result for all items
      $ret['rows'] = $q->get()->result();
                
                
      return $ret;
    }
    
    function set_individual_price($price)
    {	
        $data = array(
            'price' => $price
        );
        
        $this->db->where('type', 'individual');
        $this->db->update('payment', $data); 
    }
    
    function set_company_price($price)
    {	
     $data = array(
            'price' => $price
        );
        
        $this->db->where('type', 'company');
        $this->db->update('payment', $data); 
    }
    
    
    function set_listing_price($price)
    {	
     $data = array(
            'price' => $price
        );
        
        $this->db->where('type', 'listing');
        $this->db->update('payment', $data); 
    }
 
    
}
?>
