ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Search & Replace text in DB

September 04, 2012 8:20pm

Subscribe [2]
  • #1 / Sep 04, 2012 8:20pm

    Symon Pritchett

    11 posts

    Hi Guys

    Here’s a question for anybody with advanced SQL Skills:

    I’m re-branding a site I made and need to change text references of the old site to the new site.
    The issue is the name of the new site is 2 words, where the old site was a single word.

    eg) the text references in the DB for the “OldSite” needs to be updated to “New Site”.

    So the issue is that if i do a search replace, URL links become broken because there will be a space inserted into the url_title.

    Considerations:
    * Playa Fields
    * URL links
    * Case sensitive

    I think that only the channel_data & channel_titles table’s will need updating.


    Also thinking I could run some regex replace over the .sql, but I don’t know enough to know how to write the conditions…

     


    Does anybody know how to write the required SQL statement????

     


    Have a great day

    Symon :O)

     

  • #2 / Sep 16, 2012 6:04am

    Edd Smith

    19 posts

  • #3 / Sep 16, 2012 6:34pm

    Symon Pritchett

    11 posts

    Thanks for the Reply Edd, I ended up using EE’s native search and replace tool, table by table, it did the trick 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases