I'm trying to bring the INT values from mysql and do a addition and finally update the database. But this doesn't seem to do update? How can I fix this?
$resultSecond = mysql_query("SELECT * FROM Furniture");
while($lineSecond = mysql_fetch_array($resultSecond)) {
$item = $lineSecond["Item"];
$janD = $lineSecond["January"];
$febD = $lineSecond["February"];
$marD = $lineSecond["March"];
$pastVals = $lineSecond["yearSale"];
$totalCT = $lineSecond["monthSale"];
$totThisM = ($janD + $febD + $marD + $pastVals + $totalCT);
mysql_query("UPDATE Furniture SET Furniture = '".$totThisM."' WHERE Item ='$item' LIMIT 1");
}
UPDATEquery, as inUPDATE Furniture SET Furniture = January + February + ....