1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

SQL query to replace text in threads

Discussion in 'vBulletin' started by MrPJH, Sep 18, 2014.

  1. #1
    UPDATE text SET rawtext = replace(rawtext,  '[testting=123]', '[testing]');
    Code (markup):
    i have to run sql query under vbulletin something like i posted on above
    it works but the problem is =123 represents IDs so each tag have a unique number with it
    i want to build query so it can match any number under this "testting" tag

    any help please
     
    MrPJH, Sep 18, 2014 IP
  2. kpmedia

    kpmedia Member

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    All you need to do here is use the LIKE syntax.
    WHERE rawtext LIKE 'testing%'
    Code (markup):
    The % is the variable, like *

    I'd have to think about the full command for a second, but I'd rather you now built it, so as not to blame me if anything goes wrong.

    Hope that helps. :)
     
    kpmedia, Nov 4, 2014 IP