Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Removing text from content field

Discussion in 'Programming' started by tb987, Aug 24, 2008.

  1. tb987

    tb987 New Member Webmaster

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


    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

  2. xoozoo

    xoozoo Guest

    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;

  3. xoozoo

    xoozoo Guest

    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.


Featured Resources (View All)

Share This Page