标签:files 更新 bsp duplicate key val path stat insert
一个表中如果有 则更新 status字段 和 filename 字段,没有则 新增
INSERT INTO ec_file (updatetime, createtime, filesize, bucketname, filename, filetype , filepath )
VALUES (‘2016-08-08 12:12:12‘,‘2016-09-08 12:12:12‘,0, "huowulian","aaaaa","33", "photo/2016/12/06/1_123455_A1_951357_01_20161206101536_3924.jpg")
ON DUPLICATE KEY UPDATE status = "1", filename="cccc"
标签:files 更新 bsp duplicate key val path stat insert
原文地址:http://www.cnblogs.com/he0xff/p/6137527.html