function sms_track_update_message in SMS Framework 6
Same name and namespace in other branches
- 6.2 modules/sms_track/sms_track.module \sms_track_update_message()
- 7 modules/sms_track/sms_track.module \sms_track_update_message()
Update 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 - Implement hook_sms_receipt()
File
- modules/
sms_track/ sms_track.module, line 263 - Message tracking feature module for Drupal SMS Framework.
Code
function sms_track_update_message($reference, $status) {
$updated = time();
watchdog('sms_track', $reference . ' ' . $status . ' ' . $updated);
$result = db_query('UPDATE {sms_track} SET status = %d, updated = %d WHERE reference = \'%s\'', $status, $updated, $reference);
if ($result) {
watchdog('sms_track', 'Affected rows: ' . db_affected_rows($result));
}
}