Ignore:
Timestamp:
Nov 14, 2014 6:01:48 AM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php

    r490 r499  
    88        const TOKENPW = 'violet';
    99       
    10         function __construct(){
     10        function __construct()
     11        {
    1112        parent::__construct();
    1213                $this->vservices->setApiUrl($this->config->item('api_url'));
     
    1920        return $this->db->query($sql)->result_array();
    2021    }
     22   
    2123    function getPackage($p_id)
    2224    {
     
    2426        return $this->db->query($sql)->row_array();
    2527    }
     28   
     29    function getPackagePriceByCode ($p_code)
     30    {
     31        $sql='SELECT p_price FROM '. $this->table_name .' WHERE p_code = ?';
     32        $query =  $this->db->query($sql , array($p_code));
     33        $row = $query->row_array();
     34        return $row['p_price'];
     35    }
     36   
     37    function getPackageByCode ($p_code)
     38    {
     39        $sql='SELECT * FROM '. $this->table_name .' WHERE p_code = ?';
     40        $query =  $this->db->query($sql , array($p_code));
     41        $row = $query->row_array();
     42        return $row;
     43    }
    2644       
    2745}
Note: See TracChangeset for help on using the changeset viewer.