Skip to content

Instantly share code, notes, and snippets.

@canabady
Last active April 3, 2018 06:00
Show Gist options
  • Save canabady/899f539890e1f27b9914c65a6b748643 to your computer and use it in GitHub Desktop.
Save canabady/899f539890e1f27b9914c65a6b748643 to your computer and use it in GitHub Desktop.
If you want to replace path in images for WooProduct kept in sqlite
If you want to replace path in images for WooProduct kept in sqlite
===================================================================
The replace ((())) does extract filename from the existing path in the images
columsn and we add base path of the server folder for accesss
SQLITE Query command is as below
--------------------------------
UPDATE local_wc_product SET Images = 'http://wordpress.com/wp-content/uploads/2018/04/' || replace(images, rtrim(images, replace(images, '/', '')),'') WHERE Images IS NOT NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment