Rev | Line | |
---|
[490] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
---|
| 2 | |
---|
| 3 | class Servicepackage_model extends MY_Model |
---|
| 4 | { |
---|
| 5 | |
---|
| 6 | protected $table_name = 'tblservicepackage'; |
---|
| 7 | protected $id_name = 'p_id'; |
---|
| 8 | const TOKENPW = 'violet'; |
---|
| 9 | |
---|
| 10 | function __construct(){ |
---|
| 11 | parent::__construct(); |
---|
| 12 | $this->vservices->setApiUrl($this->config->item('api_url')); |
---|
| 13 | $this->vservices->setConnection($this->curl); |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | function getAllPackages() |
---|
| 17 | { |
---|
| 18 | $sql="SELECT * FROM ".$this->table_name.""; |
---|
| 19 | return $this->db->query($sql)->result_array(); |
---|
| 20 | } |
---|
| 21 | function getPackage($p_id) |
---|
| 22 | { |
---|
| 23 | $sql="SELECT * FROM ".$this->table_name." WHERE ".$this->id_name."=".$p_id; |
---|
| 24 | return $this->db->query($sql)->row_array(); |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.