I have been working on this problem for hours.
I would like to use an UPDATE statement with an IF .
$unit_size is usually 1.000 but it could be less than 1.000 It is never greater than 1.000
sql_up = "UPDATE table1 SET unit_total = IF (" . $unit_size . " > .999, unit_total = unit_total + 1, unit_total = unit_total + " . $unit_size . ") WHERE unit_id != '" . $unit_id . "' ORDER BY unit_id DESC LIMIT 64";
It does not store any value in unit_total
Any help would be appreciated.