Update Classifieds via SQL
-
Hi,
There are some changes i want to make to the ads, however since there are so many it would be so tedious to do so.I figured the fastest way to do so would bulk changing via SQL.
I figured out how to change the value but not the text. So whats happening is that even though the changes reflect on the front end, they aren’t changing on admin side. E.g. Take an ad for a pair of heels. Before, the heels were tagged as ‘Heels’ but i want to change all ads that have been tagged ‘Heels’ to be changed to ‘Stilettos’
Then Via SQL i ran the following script
UPDATE wp_xxxxxx_postmeta SET meta_value = ‘ Stilettos’ WHERE meta_value = ‘Heels’;
What happens is that:
– it reflects correctly on frontend from Heels to Stilettos
– On Admin, where it once said ‘Heels’ it is now blank/no option chosen. It didn’t change to ‘Stilletos’
– So when using the search filters, because nothing is selected on admin, the updated ad doesn’t show up in the relevant results.I then noted that perhaps its because I only managed to change the Value and Not the ‘Text’. Because on the registered data source plugin we input both Text and Value.
Long story short, kindly could you help me with a sql snippet that I can run that will not only change the value in the front end, but in admin too.
Thanks
- The topic ‘Update Classifieds via SQL’ is closed to new replies.