Or add every updated column to the WHERE clause.
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 )
- tye
In reply to Re^2: How to get count of rows changed by MySQL UPDATE command using DBI (where)
by tye
in thread [Solved]: How to get count of rows changed by MySQL UPDATE command using DBI
by Perl300
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |