Skip to content

Instantly share code, notes, and snippets.

@dotku
Last active September 15, 2017 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotku/974e9dbb92d54a5999822e2669ede18e to your computer and use it in GitHub Desktop.
Save dotku/974e9dbb92d54a5999822e2669ede18e to your computer and use it in GitHub Desktop.

相册处理

比如有这些 URL

/public/upload/goods/2017/08-15/1628/main/1.jpg
/public/upload/goods/2017/08-15/1628/main/2.jpg
/public/upload/goods/2017/08-15/1628/main/3.jpg
/public/upload/goods/2017/08-15/1628/main/4.jpg
/public/upload/goods/2017/08-15/1628/main/5.jpg
/public/upload/goods/2017/08-15/1628/main/6.jpg

倒入数据库

INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/1.jpg', '0');
INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/2.jpg', '0');
INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/3.jpg', '0');
INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/4.jpg', '0');
INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/5.jpg', '0');
INSERT INTO `tpshop_2`.`tp_goods_images` (`img_id`, `goods_id`, `image_url`, `is_trash`) VALUES (NULL, '1628', '/public/upload/goods/2017/08-15/1/main/6.jpg', '0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment