慕村225694
1234$result = mysql_query("SELECT `id`, `Retail` FROM `table` WHERE `Retail` - `Cost` < 30");while($row = mysql_fetch_array($result)) { mysql_query("UPDATE SET `Retail`='".$row['Retail'] + 20."' WHERE `id`='".$row['id']."';");}