• Resolved eddywebs

    (@eddywebs)


    Hi , I am trying to come up with a SQL query to update a custom field value of all the wordpress post at once.

    The custom field is “price” : and I am trying to update all the values by 20% (that is .20*price) .

    I know all the custom fields are stored at wp_postmeta table but dont know where to go from there.
    Any suggestions ???

Viewing 1 replies (of 1 total)
  • Thread Starter eddywebs

    (@eddywebs)

    got it the query would be Update wp_postmeta set meta_value = (meta_value * .20) where meta_key = ‘price’;

Viewing 1 replies (of 1 total)

The topic ‘Updating custom field values using the SQL database’ is closed to new replies.