2012-07-10 111 views
0

MySQL版本63年1月5日-CLL 使用phpMyAdmin編輯MySQL查詢更新

所以我有這個表ps_layered_price_index 我想編輯/更新列: -

price_min AND 
price_max 
(updating the current value+10) 

where column(id_product) = ALL 

回答

1

如果要更新表的每一行,那麼你可以嘗試這樣的事:

UPDATE 
ps_layered_price_index 
SET 
price_min = price_min + 10, 
price_max = price_max + 10 

對於單行:

UPDATE 
ps_layered_price_index 
SET 
price_min = price_min + 10, 
price_max = price_max + 10 
WHERE 
id_product = 87 
+0

感謝會嘗試一下,如果我想選擇等,其中id_product = 87 – 2012-07-10 15:59:27

+0

thanks.wll嘗試一下,如果我想去做哪裏id_product = 87?causee我不斷收到語法錯誤與它..zzz – 2012-07-10 16:00:24

+0

其中id_product = 87; – CountMurphy 2012-07-10 16:04:14