Example #1
0
 function updateAddress($address, $type, $idcontact_address, $city = null, $state = null, $street = null, $zip = null, $country = null)
 {
     $ca_address = new ContactAddress();
     $ca_address->getId($idcontact_address);
     // Primarykey id of the record to update
     $new_address->city = $city;
     $new_address->state = $state;
     $new_address->street = $street;
     $new_address->zipcode = $zip;
     $new_address->country = $country;
     $ca_address->address = $address;
     $ca_address->address_type = $type;
     $ca_address->update();
 }