Mysql

update a00 ,(select  a,b as bb from a00) as T2  set a00.d =CONCAT("{themeCode:",'"',T2.bb,'"',"}")      where  a00.a =T2.a    

10:05:50 update a00 ,(select a,b as bb from a00) as T2 set a00.d =CONCAT("{themeCode:",'"',T2.bb,'"',"}") where a00.a =T2.a Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.034 sec

 

 

SET SQL_SAFE_UPDATES = 0

 

update wall ,(select id,background_color,font_color,background_imag_url from wall) as T2 set wall.theme_data =CONCAT('{"backgroundColor":"',T2.background_color,'","fontColor":"',T2.font_color,'","backgroundImagUrl":"',T2.background_imag_url,'"}'),wall.theme_code='CUSTOM' where wall.id =T2.id 

posted @ 2015-11-17 11:40  wind90  阅读(130)  评论(0编辑  收藏  举报