The Most Active and Friendliest
Affiliate Marketing Community Online!

“AdsEmpire”/  Direct Affiliate

Removing text from content field

tb987

New Member
affiliate
I have removed a Joomla component from a site that have, but the following text is left in the content.

{mos_sb_discuss:123}

Rather than going to the hundreds of content pages I was wondering if it is possible to do this with a sql command or from phpmyadmin.

Thanks in advance

Tony
 
Hi Tony,

This should work...

UPDATE TABLE_NAME SET FIELD_NAME = REPLACE(FIELD_NAME, '{mos_sb_discuss:123}', '');

Obviously replacing TABLE_NAME and FIELD_NAME as required, take a backup of the DB before hand just in case ;)

You should be able to pre-test by running the following select to make sure it does what you expect...

SELECT replace(FIELD_NAME, '{mos_sb_discuss:123}', '') FROM TABLE_NAME;

Cheers,
Sean
 
Actually you should probably add WHERE FIELD_NAME LIKE '%{mos_sb_discuss:123}%' to the end of that SQL, since there is no point in trying to update rows where there is nothing to update.

Cheers,
Sean
 
banners
Back