}
}
- static public function delete($pid, $type, $jobid = null)
+ public function delete()
+ {
+ XDB::execute('DELETE FROM profile_addresses
+ WHERE pid = {?} AND jobid = {?} AND type = {?} AND id = {?}',
+ $this->pid, $this->jobid, $this->type, $this->id);
+ }
+
+ static public function deleteAddresses($pid, $type, $jobid = null)
{
$where = '';
if (!is_null($pid)) {
}
}
+ public function delete()
+ {
+ XDB::execute('DELETE FROM profile_phones
+ WHERE pid = {?} AND link_type = {?} AND link_id = {?} AND tel_id = {?}',
+ $this->pid, $this->link_type, $this->link_id, $this->id);
+ }
+
static public function deletePhones($pid, $link_type, $link_id = null)
{
$where = '';
$selectedJob = Env::has('selectedJob');
Phone::deletePhones(0, Phone::LINK_COMPANY, $id);
- Address::delete(null, Address::LINK_COMPANY, $id);
+ Address::deleteAddresses(null, Address::LINK_COMPANY, $id);
if (Env::has('change')) {
XDB::execute('UPDATE profile_job
SET jobid = {?}
public function save(ProfilePage &$page, $field, $value)
{
Phone::deletePhones($page->pid(), Phone::LINK_ADDRESS);
- Address::delete($page->pid(), Address::LINK_PROFILE);
+ Address::deleteAddresses($page->pid(), Address::LINK_PROFILE);
Address::saveFromArray($value, $page->pid(), Address::LINK_PROFILE);
}
XDB::execute("DELETE FROM profile_job_term
WHERE pid = {?}",
$page->pid());
- Address::delete($page->pid(), Address::LINK_JOB);
+ Address::deleteAddresses($page->pid(), Address::LINK_JOB);
Phone::deletePhones($page->pid(), Phone::LINK_JOB);
$terms_values = array();
foreach ($value as $id => &$job) {