PHP Mysql WHERE clause not working -
i have query below doesn't seem work. in 1 blow wanted update rows who's current price not equal temporary price. want column prevprice copy or same column currprice.
it not give errors, never updates prevprice.
$previousprices = mysqli_query($conn,"update allproducts temporaryprice != currprice set prevprice=currprice");
set
comes before where
update allproducts set prevprice = currprice temporaryprice != currprice
and, yes, !=
valid mysql:
http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_not-equal
Comments
Post a Comment