wordpress - Based on the following MYSQL query how can I write an UPDATE statement to update a value? -
I am using the following SQL query to get a record from a WordPress database.
select p.id, p.post_title, m.meta_key, m.meta_value, t.slug wp_posts p at p.id = m.post_id and m.meta_key = wp_postmeta meter Join '_ subscription_sign_up_fee' internally as wp_term_relationships p.id = tr.object_id on TR included in the form of TT tr.term_taxonomy_id = tt.term_taxonomy_id on the inside wp_terms tt tt.term_id = t.term_id t on t wp_term_taxonomy. Slug = 'bundle' is included in the form My problem is that I need to increase the value of _subscription_sign_up_fee to 100.
I tried the following
wp_postmeta set up wp_postmeta.meta_value = wp_postmeta.meta_value + 100 INNER JOIN wp_postmeta wp_posts.id = m.post_id and m.meta_key = Join '_lib_sign_up_fee' inner wp_posts.id = tr.object_id as tr in inner wp_term_taxonomy Join tr.term_taxonomy_id = tt.term_taxonomy_id as tn.term_id = t.term_id at t as ASNER JOIN wp_terms t.slug = ' The bundle is saying 'column' meta_value 'is obscure in the field list.' I am very sorry to get an error that I do not understand surnames, is there any issues Can you point in the right direction?
To add a MySQL update, SET is finished on the right syntax. . You also have some problems in that you are joining wp_postmeta twice, but lost to join wp_posts
should work like this; Add wp_posts.id = m.post_id and m.meta_key = '_subscription_sign_up_fee' on the basis of the updated wp_postmeta meter wp_posts add wp_posts.id = tr.object_id as tr as wp_term_taxonomy form TT at TR.term_taxonomy_id Ttm.tm_taxonomy_id JT wp_terms TT as T. Tm_id = t term_id set m.meta_value = m.meta_value + 100 ou t.slug = 'bundle'
... and always before randomly running potentially devastating operations from your data Remember to take a backup of the Internet :)
Comments
Post a Comment