Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //fungsi untuk update package yang di post dari JSON
- public function update($r) {
- $id = $r['OfferedEntityUriId'];
- $data = array(
- 'OfferedEntitlementId' => $r['OfferedEntitlementId']
- );
- $this->db->where('PackageId', $id);
- $this->db->update('Package_r', $data);
- $i = 0;
- foreach ($r['PolicyId'] as $Duration) {
- $id = $r['OfferedEntityUriId'];
- $data3 = array(
- 'PolicyId' => $r['PolicyId'][$i],
- );
- //$data3_all[] = $data3;
- $this->db->where('PackageId', $id);
- $this->db->update('Terms_r', $data3);
- $i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement