title: Mysql error shows #1221 - Incorrect usage of UPDATE and ORDER BY
body: <p>I tried to use order by in following query but error shows #1221 - Incorrect usage of UPDATE and ORDER BY</p>
  <pre><code>UPDATE products 
  JOIN (SELECT @rank := 0 ) r 
  SET `sort_order`=@rank:=@rank+1 
  WHERE `prd_status`=1 AND `prd_popular`=1 AND `prd_booked`=0 AND `prd_sold`=1 AND `prd_rd_mini`=0
  ORDER BY `prd_price`DESC
  </code></pre>