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

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -