Duplicate MySQL rows with slight changes


/ Published in: MySQL
Save to your folder(s)

For use with AWS S3 Wordpress pluign


Copy this code and paste it in your HTML
  1. INSERT INTO wp_postmeta (post_id, meta_key, meta_value)
  2. SELECT post_id, 'amazonS3_info' as meta_key, CONCAT('a:2:{s:6:"bucket";s:7:"bucketname";s:3:"key";s:', CHAR_LENGTH(meta_value) + 19,':"wp-content/uploads/', meta_value, '";}') FROM wp_postmeta WHERE meta_key = '_wp_attached_file'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.