1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Inserting string values that contain a full bbcode link

Discussion in 'General PHP and MySQL Discussions' started by Sunka, Aug 25, 2016.

  1. Sunka

    Sunka Well-Known Member

    Need help for this sql
    Problem is if I have link bbcode. How to insert string with bbcode link inside?
    Code:
    UPDATE
        xf_user_profile SI
    SET
        SI.signature = '[I][COLOR=#404040][B]Ovo je defaultni signature (potpis)[/B][/COLOR][/I] - predstavljanje - [B][URL='https://www.pijanitvor.com/threads/kako-namjestiti.25213/']klikni me[/URL][/B]'
    WHERE
        SI.signature = "";
    
     
  2. Sunka

    Sunka Well-Known Member

    I found it my self.
    Have to use escape character \ and double '

    So query looks like this:

    Code:
    UPDATE
        xf_user_profile SI
    SET
        SI.signature = '
    [I][COLOR=#404040][B]Ovo je defaultni signature (potpis)[/B][/COLOR][/I] - predstavljanje - [B][URL=''https\://www.pijanitvor.com/threads/kako-namjestiti.25213/'']klikni me[/URL][/B]
    '
    WHERE
        SI.signature = "";
     

Share This Page