How can I SQL update a meta_value to remove the dollar signs that were entered with the value? (so just the value remains)

For all the “price” custom fields of a site, the dollar sign was entered with the value. I need to remove the dollar sign and leave the just the values.

I know very little about SQL queries. The values are all different, so I was hoping I could use UPDATE and the wildcard to effectively delete the dollar sign, but alas, I can’t make it happen.

Read More

This is what I’m trying to achieve

UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘$%’, ‘%’) WHERE meta_key LIKE ‘price’.

Related posts

Leave a Reply

1 comment