Changeset 499 for pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php
- Timestamp:
- Nov 14, 2014 6:01:48 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/frontend/models/servicepackage_model.php
r490 r499 8 8 const TOKENPW = 'violet'; 9 9 10 function __construct(){ 10 function __construct() 11 { 11 12 parent::__construct(); 12 13 $this->vservices->setApiUrl($this->config->item('api_url')); … … 19 20 return $this->db->query($sql)->result_array(); 20 21 } 22 21 23 function getPackage($p_id) 22 24 { … … 24 26 return $this->db->query($sql)->row_array(); 25 27 } 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 } 26 44 27 45 }
Note: See TracChangeset
for help on using the changeset viewer.