Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isset($omsg['uContactor']) && is_array($omsg['uContactor'])) {
- $mask = '';
- foreach ($omsg['uContactor'] as $value) {
- $mask .= ($value !== null) ? '1' : '0';
- }
- $sql_update = "UPDATE Devices SET Mask_Command = :device_mask WHERE id = :device_id";
- try {
- $stmt_update = $db->db->prepare($sql_update);
- $stmt_update->execute([
- ':device_mask' => $mask,
- ':device_id' => $ival['Devices_id']
- ]);
- } catch (Exception $e) {
- error_log('Device update error: ' . $e->getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement