Skip to content

Instantly share code, notes, and snippets.

@juiceByStaplez
Created August 10, 2015 19:32
Show Gist options
  • Save juiceByStaplez/ad7397c38b1f2281db89 to your computer and use it in GitHub Desktop.
Save juiceByStaplez/ad7397c38b1f2281db89 to your computer and use it in GitHub Desktop.
if($appt_day == null || $appt_time == null) {
if($appt_referred !== null && $appt_notes !== null) {
$update = $wpdb->update('ea_appts',
array(
'referral' => $appt_referred,
'notes' => $appt_notes,
'updated_by' => $user_id
), array('id' => $appt_id)
);
} else if($appt_referred == null) {
$update = $wpdb->update('ea_appts',
array(
'notes' => $appt_notes,
'updated_by' => $user_id
), array('id' => $appt_id)
);
} else if ($appt_notes == null) {
$update = $wpdb->update('ea_appts',
array(
'referral' => $appt_referred
'updated_by' => $user_id
), array('id' => $appt_id)
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment