Create/modify a MySQL query

Befejezett Kiadva: 3 évvel ezelőtt Kiszállításkor fizetve
Befejezett Kiszállításkor fizetve

I recently migrated from PHPBB forum software to MyBB software, but when the conversion finished I was left with lots of weird characters in many posts, such as <P>, </e> , etc.

I used the below query to remove things like this, and it has worked well and removed lots of these characters:

UPDATE mybb_posts SET message = REPLACE (message, '<P>', '') WHERE message LIKE '%<P>%';

My problem now is that the stuff I need to remove varies from post to post - here's a few examples:

">[login to view URL] ... Sw7k9eIFHa</a><!-- m -->

">[login to view URL] ... x?TypeID=F</a><!-- m -->

">[login to view URL] ... gKQjPD_BwE</a><!-- m -->

As you can see, each line that I need to remove starts and ends with the same group of characters. I modified the above query using the % as the wildcard, so the query became:

UPDATE mybb_posts SET message = REPLACE (message, '">htt%m -->', '') WHERE message LIKE '%">htt%m -->'%';

When I click "Simulate Query" I get a message saying 1643 rows affected, but when I click "Go" to run the query it comes back and tells me 0 rows affected.

I need someone to tell me what's wrong with my query or suggest another query to achieve the same outcome.

PHP MySQL

Projektazonosító: #25900033

A projektről

5 ajánlat Távolról teljesíthető projekt Utoljára aktív: 3 évvel ezelőtt

Odaítélve:

jexxx8910

Hi, I know what's wrong with your query and I can help you to fix that query. Please contact me and let's discuss more about this. Thanks.

£10 GBP 1 napon belül
(28 értékelés)
3.7

5 szabadúszó tett átlagosan 13£ összegű árajánlatot erre a munkára

CloudAdvisory

Hi, Your posting is very interesting. I have 8 years of experience in web development field. I have worked on several projects with php, mysql and can deliver quality result to tight deadlines. Looking forward to conne Továbbiak

£15 GBP 7 napon belül
(1 Visszajelzés)
2.4
feloacu

I tried your sql query. Yes, it works, but 0 rows affected. I think there is a problem in REPLACE function. What do you want as result of your query exactly? Can I help you?

£10 GBP 1 napon belül
(0 vélemény)
0.0