vservices->setApiUrl($this->config->item('api_url')); $this->vservices->setConnection($this->curl); } function getAllPackages() { $this->db->query('UNLOCK TABLES'); $sql="SELECT * FROM ".$this->table_name.""; return $this->db->query($sql)->result_array(); } function getPackage($p_id) { $this->db->query('UNLOCK TABLES'); $sql="SELECT * FROM ".$this->table_name." WHERE ".$this->id_name."=".$p_id; return $this->db->query($sql)->row_array(); } function getPackagePriceByCode ($p_code) { $this->db->query('UNLOCK TABLES'); $sql='SELECT p_price FROM '. $this->table_name .' WHERE p_code = ?'; $query = $this->db->query($sql , array($p_code)); $row = $query->row_array(); return $row['p_price']; } function getPackageByCode ($p_code) { $this->db->query('UNLOCK TABLES'); $sql='SELECT * FROM '. $this->table_name .' WHERE p_code = ?'; $query = $this->db->query($sql , array($p_code)); $row = $query->row_array(); return $row; } }