phpbb3 - How can I mass edit mysql tables in one field ONLY WHEN another field meets exact requirements? -


a situation looks that: want make mass edit in mysql database phpbb 3. have seen mysql queries here told me how can such mass edit (for example) post_text , change links.

i know can way:

update phpbb_posts set post_text='new_link.eu' post_text 'old_link.eu'.

and know change of links old_link.eu new_link.eu.

but situation different. want make edit posts meet exact requirements. there simple - want query change posts have specific forum_id field (they belong proper subforum, want see change).

i believe thing helpful many people using different scripts.

thanks in advance!

unless there's complexity requirement can't see here, should able easily.

  update phpbb_posts       set post_text='new_link.eu'     post_text = 'old_link.eu'      , forum_id = <<whatever>> 

you should table contents before this. if fat-finger in query, hard recover unless have backup.

you might try

  select *     phpbb_posts     post_text = 'old_link.eu'      , forum_id = <<whatever>> 

before run update make sure you're getting right rows.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -