UPDATE table_name
SET good_high = $tgh
, critical_low = $tcl
, warning_low = $twl
, warning_high = $twh
WHERE user = ?
AND name = '$threshold_name'
AND good_high <> $tgh
AND critical_low <> $tcl
AND warning_low <> $twl
AND warning_high <> $twh
Oops: Built that WHERE clause incorrectly. It should have been:
UPDATE table_name
SET good_high = $tgh
, critical_low = $tcl
, warning_low = $twl
, warning_high = $twh
WHERE user = ?
AND name = '$threshold_name'
AND ( good_high <> $tgh
OR critical_low <> $tcl
OR warning_low <> $twl
OR warning_high <> $twh )
|