MyBB Community Forums

Full Version: Vb4.25 merge to 1822
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After doing a merge none of the youtube video links work. Here is why. The top is VB.



One the great folks here supplied me this but it does not work with msql 5.7
update mybb_posts set message=regexp_replace(message, 'video=youtube;[^\]]+]', 'video=youtube]')

If someone can help me do a search and replace with phpMyAdmin, I'd love to buy a coffee.

Also future users may find this helpful in merges.
above given query should work !

anyway, you can try using REPLACE instead of regexp_replace like below
UPDATE `mybb_posts` SET `message` = REPLACE (`message`, 'video=youtube;[^\]]+]', 'video=youtube]') WHERE `message` LIKE '%video=youtube%' 

Edit: are you referring to MSSQL [microsoft sql] ? [see replace query]
Hi and thanks for the reply. It's MySQL 5.7 and I'm using phpMyAdmin to run the query. It gives me an error on line 4.

    `message` =
    `message` LIKE '%video=youtube%'