function sms_track_update_message in SMS Framework 7
Same name and namespace in other branches
- 6.2 modules/sms_track/sms_track.module \sms_track_update_message()
- 6 modules/sms_track/sms_track.module \sms_track_update_message()
Updates a message with a new status code.
@todo Log record handling.
Parameters
$reference: Message reference code.
$status: Message status code. See sms constants.
1 call to sms_track_update_message()
- sms_track_sms_receipt in modules/
sms_track/ sms_track.module - Implements hook_sms_receipt().
File
- modules/
sms_track/ sms_track.module, line 288 - Message tracking feature module for Drupal SMS Framework.
Code
function sms_track_update_message($reference, $status) {
$updated = REQUEST_TIME;
watchdog('sms_track', $reference . ' ' . $status . ' ' . $updated);
$result = db_update('sms_track')
->fields(array(
'status' => $status,
'updated' => $updated,
))
->condition('reference', $reference)
->execute();
if ($result) {
watchdog('sms_track', 'Affected rows: ' . db_affected_rows($result));
}
}